Skip to main content
POST

Overview

Polls for the result of a device authorization flow. The agent should call this endpoint every 5 seconds (the interval from the device code response) until it receives an API key or the code expires. No authentication required.

Body Parameters

device_code
string
required
The device_code returned by Create Device Code

Response

Success (200) — User has authorized

api_key
string
The API key to use for future requests (e.g., dk_abc123...)
key_prefix
string
First 8 characters of the key

Pending (428) — User hasn’t authorized yet

Keep polling every interval seconds.

Expired (410) — Code has expired or been used

Start a new flow with Create Device Code.

Example

Polling Logic