Tokens
Create token
Exchange API user credentials for a bearer access token plus a refresh token.
POST
/api/token/
Body parameters
email
The API user's email address.
password
The API user's password.
Example
curl -X POST https://{licensee-url}/api/token/ \ -H "Content-Type: application/json" \ -d '{ "email": "api@your-company.com", "password": "your-api-password" }'
const res = await fetch('https://{licensee-url}/api/token/', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'api@your-company.com', password: 'your-api-password' }) }); const { token, refresh_token } = await res.json();
import requests res = requests.post( 'https://{licensee-url}/api/token/', json={ 'email': 'api@your-company.com', 'password': 'your-api-password' } ) token = res.json()['token']
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "rfsh_abc123...",
"expires_in": 3600,
"token_type": "Bearer"
}
Try it out
Response will appear here
Errors
| Status | error.code | Cause |
|---|---|---|
| 401 | invalid_credentials | Email or password incorrect. |
| 429 | rate_limit_exceeded | Too many token requests. Wait and retry. |