---
title: "Request Access Token"
method: POST
path: "/oauth/token"
---

# Request Access Token

`POST /oauth/token`

## Request

- Base URL: `https://api.dashboard.knotapi.com`
- URL: `https://api.dashboard.knotapi.com/oauth/token`
- Auth: none required

Exchange a `device_code` for an access token once the user approves the request.

## Request body `application/x-www-form-urlencoded`

- object
  - `grant_type` 'urn:ietf:params:oauth:grant-type:device_code', required: The grant type. Must be `urn:ietf:params:oauth:grant-type:device_code`.
  - `client_id` string, required: The same client ID you sent to [Request Device Code](/api-reference/agent-authorization/request-device-code).
  - `device_code` string, required: The `device_code` from [Request Device Code](/api-reference/agent-authorization/request-device-code).

## Response `200`

Successful request.

- object
  - `token_type` string: Always `Bearer`.
  - `expires_in` integer: Seconds until the access token expires.
  - `access_token` string: Access token to send as a Bearer token.

## Other responses

- `400`: Bad request.
- `401`: Unauthorized request.
- `500`: Internal server error.

## Changes

- **2026-11-03** `f10ecfa12c00`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/knotapi/apis/knot-api/changes/oauth/token/post.md)

---

[API](https://skmtc.dev/knotapi/apis/knot-api.md) - [All operations](https://skmtc.dev/knotapi/apis/knot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/knotapi/apis/knot-api/revisions/f10ecfa12c00?raw)
