---
title: "Exchange Sso Code"
method: POST
path: "/auth/sso/exchange"
tags: ["Auth - session handoff"]
---

# Exchange Sso Code

`POST /auth/sso/exchange`

## Request

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

The session of a Google or Apple web sign-in, once: the code is good
for 60 seconds and one exchange, only in the browser that started the
sign-in (`code_verifier`), and only while the account is enabled and no
password reset or takeover came after the sign-in.

## Request body

- SsoCodeExchange
  - `code` string, required
  - `code_verifier` string, nullable

## Response `200`

Successful Response

- SessionTokensResponse
  - `access_token` string, required
  - `refresh_token` string, required

## Other responses

- `401`: ONE_TIME_CODE_INVALID: the one-time code or stream ticket is unknown, expired, already used, or minted for another purpose or route
- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **2026-10-14** `1160feeb2038`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/auth/sso/exchange/post.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) - [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) - [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/379e4a57dee8?raw)
