Poll a device login and mint the API key on approval
POST/auth/device/token
UNAUTHENTICATED. Poll every 5 s with the device_code. Non-terminal
states return 200 with status of pending or slow_down
(includes interval). Terminal: expired, denied, or
authorized. On the first poll after browser approval the response
carries the plaintext api_key (scopes read/write/ai, no expiry)
EXACTLY ONCE — persist it immediately; subsequent polls return
expired.
Request
Responses
- 200
- 400
- 500
Poll result
Validation error — see error.code and error.details
Internal error (internal_error and endpoint-specific 5xx codes). Retryable.