Cowdidocs
API ReferenceAuthentication

Sign In

Exchange a custom token (obtained from /v1/auth/exchange) for ID and refresh tokens. **Authentication Flow:** 1. Exchange partner JWT for custom token via `/v1/auth/exchange` 2. Use custom token to sign in via this endpoint 3. Receive ID token and refresh token 4. Use ID token in Authorization header for API calls 5. Refresh ID token using `/v1/auth/refresh` before expiration **Important:** Custom tokens are one-time use only.

POST
/v1/auth/sign-in

Request Body

application/json

Request to sign in with a custom token

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/auth/sign-in" \  -H "Content-Type: application/json" \  -d '{    "custom_token": "custom_token_abc123def456ghi789"  }'

Successful Sign In

{  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE...",  "refresh_token": "AOEOulb...",  "expires_in": 3600}
{  "code": "BAD_REQUEST",  "description": "Invalid input"}