---
title: "Exchange authorization code for access token"
method: POST
path: "/authorizations/exchange"
---

# Exchange authorization code for access token

`POST /authorizations/exchange`

Exchanges an authorization code for an access token

## Request body

- AuthorizationExchangeRequest
  - `exchangeToken` string, required — The token that can be used to exchange for a device token after the authorization has been approved.
  - `verifier` string, required — The verifier that was used to generate the challenge.

## Response `200`

OK

- AuthorizationExchangeResponse
  - `token` string, required — The device token that can be used to authenticate requests.
  - `user` object, required — The user that the token is for.
    - `id` string, uuid, required — The ID of a user.
    - `name` string, required — The user's display name.
    - `avatarUrl` string, required — The URL to the user's avatar.
    - `githubId` integer, nullable — The user's GitHub ID.
    - `createdAt` string, date-time, required — The date and time when the user profile was created.
    - `updatedAt` string, date-time, required — The date and time when the user profile was last updated.

## Other responses

- `400` — Invalid request

## Changes

- **2026-02-06** `0c4e8d8a5c2a` — 1 breaking, 6 warning
  - the response property `user/allOf[#/components/schemas/User]/githubId` became nullable for the status `200`
  - removed the optional property `user/allOf[#/components/schemas/User]/email` from the response with the `200` status
  - removed the optional property `user/allOf[#/components/schemas/User]/inviteCount` from the response with the `200` status
  - removed the optional property `user/allOf[#/components/schemas/User]/isBlocked` from the response with the `200` status
  - …3 more
- **2024-02-28** `f8d3b912d946` — 6 info
  - added the optional property `user/allOf[#/components/schemas/User]/email` to the response with the `200` status
  - added the optional property `user/allOf[#/components/schemas/User]/inviteCount` to the response with the `200` status
  - added the optional property `user/allOf[#/components/schemas/User]/isBlocked` to the response with the `200` status
  - added the optional property `user/allOf[#/components/schemas/User]/isStaff` to the response with the `200` status
  - …2 more

[Change history](https://skmtc.dev/jsr-io/apis/jsr-api/changes/authorizations/exchange/post.md)

---

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