---
title: "OAuth 2.1 token endpoint"
method: POST
path: "/api/oauth/token"
tags: ["OAuth"]
---

# OAuth 2.1 token endpoint

`POST /api/oauth/token`

## Request

- Base URL: `https://intentdocs.com`
- URL: `https://intentdocs.com/api/oauth/token`
- Auth: none declared

Exchange authorization code for access token. Validates PKCE code_verifier.

## Response `200`

Access token issued

- object
  - `access_token` string: Bearer token (intent_cli_* prefix)
  - `token_type` 'Bearer'
  - `expires_in` number: Seconds until token expires

## Other responses

- `400`: Invalid request or PKCE verification failed

---

[API](https://skmtc.dev/intentdocs/apis/intentdocs-api.md) · [All operations](https://skmtc.dev/intentdocs/apis/intentdocs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/intentdocs/apis/intentdocs-api/revisions/28abdea021d0?raw)
