---
title: "Exchange Firebase Token"
method: POST
path: "/v1/mcp/oauth/exchange_firebase_token"
tags: ["mcp", "mcp_oauth"]
---

# Exchange Firebase Token

`POST /v1/mcp/oauth/exchange_firebase_token`

## Request

- Base URL: `https://api.linktodm.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.linktodm.com/v1/mcp/oauth/exchange_firebase_token`
- Auth: none declared

Exchange a Firebase ID token for an OAuth authorization code.

Called by the LinktoDM frontend after the user has authenticated with Firebase.
Verifies the Firebase token, creates a short-lived auth code, and redirects
to the MCP client's redirect_uri with ?code=...&state=...

## Request body `application/x-www-form-urlencoded`

- BodyExchangeFirebaseTokenV1McpOauthExchangeFirebaseTokenPost
  - `firebase_token` string, required
  - `client_id` string, required
  - `redirect_uri` string, required
  - `state` string, required
  - `code_challenge` string, required
  - `code_challenge_method` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/linktodm/apis/salesmorph.md) - [All operations](https://skmtc.dev/linktodm/apis/salesmorph/llms.txt) - [OpenAPI document](https://skmtc.dev/linktodm/apis/salesmorph/revisions/4af0ad5dbe92?raw)
