---
title: "Exchange an authorization code or rotate a refresh token"
method: POST
path: "/oauth/token"
tags: ["oauth"]
---

# Exchange an authorization code or rotate a refresh token

`POST /oauth/token`

## Request

- Base URL: `https://api.contextdb.ai`
- URL: `https://api.contextdb.ai/oauth/token`
- Auth: none required

## Response `200`

Short-lived access token and optional rotating refresh token

- object

## Other responses

- `400`: Malformed request or failed validation

---

[API](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api.md) · [All operations](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api/revisions/9e441d2e21a7?raw)
