---
title: "Exchange a mobile OIDC code for a session token"
method: POST
path: "/mobile-auth/token-exchange"
tags: ["Auth"]
---

# Exchange a mobile OIDC code for a session token

`POST /mobile-auth/token-exchange`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/mobile-auth/token-exchange`
- Auth: none required

## Request body

- MobileTokenExchangeRequest
  - `code` string, required
  - `code_verifier` string, required
  - `redirect_uri` string, uri, required
  - `state` string, required
  - `nonce` string

## Response `200`

Session created successfully.

- MobileTokenExchangeSuccess
  - `token` string, required

## Other responses

- `400`: Missing or invalid required fields.
- `401`: Token did not contain usable claims.
- `500`: Token exchange failed.

## Changes

- **2026-03-30** `12085561b059`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/changes/mobile-auth/token-exchange/post.md)

---

[API](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api.md) - [All operations](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/revisions/6ad730b13e59?raw)
