Exchange partner client_id and client_secret for access and refresh tokens.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | string | Yes | Must be client_credentials |
client_id | string | Yes | API client id issued by TRP |
client_secret | string | Yes | API client secret |
Sample request
{
"grant_type": "client_credentials",
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
Responses
200 Token issued
{
"status": true,
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 14400,
"refresh_expires_in": 604800,
"agent": { "id": 10049, "email": "agent@example.com" }
}
400 VALIDATION_ERROR
401 INVALID_CLIENT