---
title: "Exchange an authorization code"
method: POST
path: "/oauth/token"
tags: ["Agent"]
---

# Exchange an authorization code

`POST /oauth/token`

## Request

- Base URL: `https://studio.listnr.ai/api/v1`
- URL: `https://studio.listnr.ai/api/v1/oauth/token`
- Auth: none required
- TypeScript: <https://skmtc.dev/listnr/apis/listnr-studio-api/docs/oauth/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Token endpoint declared for agents. The public host does not mint generation credentials. Retry with the same Idempotency-Key to avoid duplicate exchanges.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `grant_type` string
  - `code` string

## Other responses

- `400`: Token is not issued on the public host
- `429`: Too many requests from this IP. Honor RateLimit and Retry-After.

---

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