---
title: "Exchange OAuth2 token"
method: POST
path: "/oauth2/token"
tags: ["OAuth2"]
---

# Exchange OAuth2 token

`POST /oauth2/token`

Exchanges authorization code or other grant type for access tokens. Supports authorization code, refresh token, and client credentials flows. Client authentication via authorization header or client credentials.

## Response `200`

Success

- OAuth2TokenResponse
  - `access_token` string, required — The access token for API authorization
  - `token_type` string, required — The type of token, typically "Bearer"
  - `expires_in` integer, required — The number of seconds until the access token expires
  - `refresh_token` string, required — The refresh token for obtaining new access tokens
  - `scope` string, required — The space-separated list of granted scopes

## Other responses

- `400` — Bad Request - The request was malformed or contained invalid data
- `429` — Too Many Requests - You are being rate limited
- `500` — Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/fluxer/apis/fluxer-api.md) · [All operations](https://skmtc.dev/fluxer/apis/fluxer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluxer/fluxer-api/revisions/d9c706133cc5/schema)
