---
title: "Exchange Login Code"
method: POST
path: "/api/auth/exchange"
---

# Exchange Login Code

`POST /api/auth/exchange`

## Request

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

Trade the Google callback's code for a session JWT. Needs the verifier
the dashboard kept in this browser's sessionStorage when it started the
sign-in, so a code someone else obtained cannot sign this browser in.

## Request body

- LoginExchangeRequest
  - `code` string, required
  - `verifier` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-28** `f48b7596b582`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openshorts/apis/openshorts-api/changes/api/auth/exchange/post.md)

---

[API](https://skmtc.dev/openshorts/apis/openshorts-api.md) - [All operations](https://skmtc.dev/openshorts/apis/openshorts-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openshorts/apis/openshorts-api/revisions/62b7629b5e88?raw)
