Cowdidocs
API ReferenceAuthentication

Exchange Firebase Phone Number Verification token

Exchange a Firebase Phone Number Verification (PNV) JWT for a Cowdi custom token. **Flow:** 1. Client completes phone verification via Firebase PNV SDK 2. Send the PNV JWT to this endpoint 3. Receive a Cowdi custom token (one-time use) 4. Sign in with the custom token via `/v1/auth/sign-in` to obtain ID + refresh tokens The PNV token's `sub` claim must contain the verified E.164 phone number. If a Cowdi user with that phone exists, they are signed in. Otherwise a new user is provisioned on the waiting list.

POST
/v1/auth/public/exchange/phone

Request Body

application/json

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/auth/public/exchange/phone" \  -H "Content-Type: application/json" \  -d '{    "phone_verification_token": "string"  }'
{  "access_token": "string",  "token_type": "string",  "expires_in": 0}
{  "code": "BAD_REQUEST",  "description": "Invalid input"}