---
title: "Firebase Exchange"
method: POST
path: "/api/v1/auth/firebase-exchange"
tags: ["Auth"]
---

# Firebase Exchange

`POST /api/v1/auth/firebase-exchange`

## Request

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

Verify a Firebase ID token, upsert the user, mint AfricaDB JWTs.

Response shape matches /auth/login exactly so the frontend can
treat this as a drop-in alternative code path.

## Request body

- FirebaseExchangeRequest
  - `id_token` string, required: Firebase ID token obtained client-side via signInWithPopup (google.com provider) or one of the phone/apple flows.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/africadb/apis/africa-data-bank-api.md) · [All operations](https://skmtc.dev/africadb/apis/africa-data-bank-api/llms.txt) · [OpenAPI document](https://skmtc.dev/africadb/apis/africa-data-bank-api/revisions/2a50da82945b?raw)
