---
title: "Token Endpoint"
method: POST
path: "/v1/auth/oauth/token"
tags: ["auth-oauth"]
---

# Token Endpoint

`POST /v1/auth/oauth/token`

## Request

- Base URL: `https://api.usekeel.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.usekeel.io/v1/auth/oauth/token`
- Auth: none declared

OAuth 2.1 token endpoint — both standard grants.

* ``grant_type=authorization_code`` (default when absent, for the
  shipped SDK): PKCE-verified single-use code exchange.
* ``grant_type=refresh_token`` (RFC 6749 §6): rotation with reuse
  detection — standards-following clients (Claude Code, Cursor,
  ChatGPT) POST refresh grants HERE, per the AS metadata's
  ``grant_types_supported``. The legacy ``/refresh`` route remains
  for the shipped SDK.

Accepts form-encoded and JSON bodies (see ``_parse_token_body``).

## Response `200`

Successful Response

- TokenResponse: OAuth 2.0-style token response (RFC 6749 §5.1).
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` 'Bearer'
  - `expires_in` integer, required: Access-token lifetime in seconds.
  - `scope` string, required: Space-separated granted scope: the advertised tier tokens the credential fully covers (`base`, `live`) first, then the resolved credential_scopes (Q-1786).

---

[API](https://skmtc.dev/usekeel/apis/keel-api.md) · [All operations](https://skmtc.dev/usekeel/apis/keel-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usekeel/apis/keel-api/revisions/3191ca10b0ab?raw)
