---
title: "Exchange Code"
method: POST
path: "/api/auth/exchange"
tags: ["auth"]
---

# Exchange Code

`POST /api/auth/exchange`

## Request

- Base URL: `https://www.gateco.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://www.gateco.ai/api/auth/exchange`
- Auth: none declared

Exchange a one-time OAuth auth code for tokens (D3).

## Request body

- ExchangeCodeRequest
  - `code` string, required

## Response `200`

Successful Response

- TokenResponse
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` string
  - `expires_in` integer, required

## Other responses

- `422`: Validation Error

---

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