---
title: "Approve a device authorization request"
method: POST
path: "/oauth/device/approve"
---

# Approve a device authorization request

`POST /oauth/device/approve`

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"`.

## Request body

- object
  - `thread` string — Thread ID (`thr_...`) to bind to the authorization. Required when the requested scopes include a thread-scoped permission.
  - `user_code` string, required — User-facing verification code shown on the device. Identifies the pending authorization to approve.

## Response `200`

Successful response

- DeviceAuthorizationStatusResponse — The result of a completed OAuth 2.0 Device Authorization flow, indicating whether the user approved or denied the device's access request.
  - `status` string, required — Outcome of the device authorization request. One of `"approved"` (the user granted access) or `"denied"` (the user rejected or cancelled the request).

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

[API](https://skmtc.net/archastro/apis/archastro-platform-api.md) · [All operations](https://skmtc.net/archastro/apis/archastro-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/archastro/archastro-platform-api/revisions/a8772b442f86/schema)
