v1

latestOpenAPI 3.0.02026-08-04891301.4 MB

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 the device_code for an access token.

Requires a valid user session — the request must be authenticated as an end user, not a machine client. The user_code must belong to a pending (not expired, not already approved or denied) authorization associated with the calling app.

If the requested scopes include a thread-scoped permission, you must supply the thread parameter; omitting it returns a 400 with error: "invalid_scope".

post/oauth/device/approve

Request body

threadstring

Thread ID (thr_...) to bind to the authorization. Required when the requested scopes include a thread-scoped permission.

user_codestring required

User-facing verification code shown on the device. Identifies the pending authorization to approve.

Example request

{
  "thread": "string",
  "user_code": "string"
}

Response

Successful response

statusstring required

Outcome of the device authorization request. One of "approved" (the user granted access) or "denied" (the user rejected or cancelled the request).

Example response

{
  "status": "approved"
}