Request
Response
Returned bare — unlike the/v1 endpoints, it is not wrapped in a data
envelope.
verification_uri is served by the Portal, not by the management API, and
its host is built from the environment the API runs in. Show the human the
value that came back in the response — do not hard-code a host.Flow
- Request a device code. The response carries both codes, the verification URL, and the poll interval.
- Show the human
verification_urianduser_code. Or openverification_uri_completedirectly. - Poll
/oauth/tokeneveryintervalseconds until it returns a token or a terminal answer.
Polling
Poll no faster thaninterval — 5 seconds. A 400 means the human has not
decided; keep waiting. Stop on a 200 (you have a token) or a 403 (the human
declined), and bound the number of attempts.
Branch on the status code rather than on the contents of the error body. Once a
device code stops being usable, the answer is terminal: request a new device
code and start over rather than continuing to poll the old one.
On approval, the exchange consumes the session — the device code is
single-use. A second poll after a successful exchange finds no session.
Status codes
There is no rate limit on this endpoint.
Related
- Get Token — the polling step
- Authentication