Exchange a device code for a CLI credential
Polls the device authorization grant. Every answer is a 200 whose status says where the grant stands: pending (keep polling; reason: slow_down asks for a longer interval), failed (expired or denied — start again), or granted / granted-machine, which carries the credential exactly once. Unlike RFC 8628 §3.5, a pending or failed grant is not an HTTP 400 error response.
/auth/cli/device/tokenAuthorizationBearer token (varsafe device code) · headerrequiredThe single-use device code returned by POST /auth/cli/device, presented as Authorization: Bearer <device_code> while polling for approval. It is a 48-byte secret and never travels in a query string — it is a credential, even though these routes need no account.
Success.
statusstringrequiredreasonstringrequiredauthorization_pendingslow_downstatusstringrequiredreasonstringrequiredexpireddeniedstatusstringrequiredtokenstringrequiredgrantIdstring<uuid>requiredaccountobjectrequiredShow propertiesHide properties
userIdstringrequiredemailstring<email>requirednamestring | nullrequiredteamsobject[]requiredShow propertiesHide properties
objectteamIdstring<uuid>requiredteamNamestringrequiredscopesstring[]requiredstatusstringrequiredtokenstringrequiredapiTokenIdstringgrantIdstring<uuid>accountobjectrequiredShow propertiesHide properties
userIdstringrequiredemailstring<email>requirednamestring | nullrequiredteamobjectShow propertiesHide properties
teamIdstring<uuid>requiredteamNamestringrequiredprojectsstring[]environmentsstring[]teamsobject[]Show propertiesHide properties
objectteamIdstring<uuid>requiredteamNamestringrequiredscopesstring[]requiredexpiresAtstring<date-time>requiredThe request failed validation. field names the offending input.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
No credential was presented, or it is invalid or revoked.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
The credential is valid but lacks the required scope, role or team access.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
The resource does not exist, or is not visible to this credential.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
Rate limited. Retry after the interval named in the response.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
Unexpected server error. The body never carries internal detail.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.