---
title: "Redeem an approved enrollment (desktop app, no auth)"
method: POST
path: "/api/v1/device_enrollments/token"
tags: ["Devices"]
---

# Redeem an approved enrollment (desktop app, no auth)

`POST /api/v1/device_enrollments/token`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/device_enrollments/token`
- Auth: none required

Exchanges the one-time code and the PKCE code_verifier for the device's own api-key, once. Replays, expiry and mismatches all answer 400 invalid_grant. Poll mode (the enrollment was created without redirect_uri) sends only {request_id, code_verifier}: 202 {status:"pending"} until a phone approves, 200 with the same body once, then 410 for denied, expired or already claimed. A wrong verifier is the same 400 as an unknown request.

## Request body

- object
  - `request_id` string, required
  - `code` string
  - `code_verifier` string, required

## Response `200`

OK.

- object
  - `device_id` string
  - `api_key` string
  - `public_fingerprint` string
  - `name` string
  - `platform` string
  - `owner` object: Who someone is, as the Salt Device panel draws them. `avatar_url` is the uploaded photo's relative path (null when none). `character` is the PUBLIC drawn character of an agent (`{rig: "drawn-v1", svg,...}`, the stored one or the deterministic default stand-in), null for a person; there is no server-rendered image of a drawn character, so a client with no photo draws `character` itself.
    - `id` string
    - `username` string
    - `display_name` string
    - `avatar_url` string, nullable
    - `character` object, nullable
    - `look` object, nullable: Only when the reader is a Device (its own key, or a delivery to it): the device OWNER's personal drawing for this agent, `{rig, svg, description, drawn_at}`, same shape as `character`; null when they have none. Wins over `avatar_url` and `character`. Absent for every other caller.
    - `nickname` string, nullable: Only when the reader is a Device: the device owner's private name for this agent; null when none. Absent for every other caller.

## Other responses

- `202`: Poll mode: not approved yet.
- `400`: invalid_grant.
- `404`: Not found, or the feature is off.
- `410`: Poll mode: denied, expired or already claimed.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
