---
title: "Exchange authorization code for tokens"
method: POST
path: "/auth/token"
tags: ["Auth"]
---

# Exchange authorization code for tokens

`POST /auth/token`

## Request body

- object
  - `code` string, required
  - `appId` string, required
  - `appSecret` string
  - `codeVerifier` string
  - `redirectUri` string

## Response `200`

Token response

- object
  - `data` object, required
    - `accessToken` string, required
    - `refreshToken` string, required
    - `userId` string, required
    - `email` string, nullable, required
    - `scopes` string[], required
    - `expiresAt` string, required

## Other responses

- `400` — Invalid, expired, or already-used code
- `401` — Invalid app secret
- `500` — Internal server error

---

[API](https://skmtc.net/urantia/apis/urantia-papers-api.md) · [All operations](https://skmtc.net/urantia/apis/urantia-papers-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/urantia/urantia-papers-api/versions/fc43de3e7ffc/schema)
