Request body.
Optionalthread?: stringThread ID (thr_...) to bind to the authorization. Required when the requested scopes include a thread-scoped permission.
User-facing verification code shown on the device. Identifies the pending authorization to approve.
Confirmation that the device authorization was approved. The status field will be "approved".
Inspect a pending device authorization Returns the client name, requested scopes, and expiration for a pending device authorization owned by the calling app. The caller must be an authenticated user. This endpoint never approves the request.
Optionalparams: { code?: string }Query parameters.
Optionalcode?: stringUser-facing device authorization code.
Successful response
Initiate a device authorization request
Starts the OAuth 2.0 Device Authorization flow for a device that cannot
perform browser-based redirects. Returns a device_code (used by the device
to poll for a token) and a user_code (shown to the user to enter at the
verification_uri).
This endpoint requires a publishable API key; secret keys are rejected with
a 403. Third-party OAuth must be enabled on the app; if it is not, the
response returns error: "third_party_oauth_not_enabled" with a 403.
The endpoint is rate-limited to 10 requests per IP per minute. Excess
requests receive a 429 response. The returned codes expire after
expires_in seconds; once expired, a new authorization request must be
initiated.
Request body.
OAuth client ID (cli_...) identifying the application requesting authorization.
Optionalscope?: stringSpace-separated list of OAuth scopes to request, e.g. "read write". Omit to request only the default scopes configured for the client.
Device authorization codes and polling parameters. Present the user_code to the user and direct them to verification_uri. Poll the token endpoint using device_code at the rate given by interval.
Deny a device authorization request
Rejects the pending device authorization identified by user_code, preventing
the device from obtaining an access token. Once denied, the device will
receive an access_denied error on its next token poll.
Requires a valid user session. The user_code must belong to a pending
authorization associated with the calling app. Attempting to deny an already
approved, already denied, or expired authorization returns a 400.
Request body.
User-facing verification code shown on the device. Identifies the pending authorization to deny.
Confirmation that the device authorization was denied. The status field will be "denied".
Approve a device authorization request Grants the pending device authorization identified by
user_code, completing the OAuth Device Authorization flow on behalf of the authenticated user. Once approved, the device can exchange thedevice_codefor an access token. Requires a valid user session — the request must be authenticated as an end user, not a machine client. Theuser_codemust belong to a pending (not expired, not already approved or denied) authorization associated with the calling app. If the requested scopes include athread-scoped permission, you must supply thethreadparameter; omitting it returns a 400 witherror: "invalid_scope".