Cowdidocs
API ReferenceAuthentication

Refresh Token

Refresh an expired or expiring ID token using a refresh token. **Token Refresh Guide:** 1. Monitor ID token expiration (typically 1 hour) 2. Before expiration, call this endpoint with refresh token 3. Receive new ID token and refresh token 4. Update stored tokens with new values 5. Continue using new ID token for API calls **Best Practice:** Refresh tokens proactively before ID token expires.

POST
/v1/auth/refresh

Request Body

application/json

Request to refresh an ID token

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/auth/refresh" \  -H "Content-Type: application/json" \  -d '{    "refresh_token": "refresh_token_example_abc123def456"  }'

Successful Refresh

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