Overview
Use this endpoint to exchange your Client ID and Client Secret for an access token. This token must be included in the Authorization header of subsequent API requests.
Standard Bearer token (e.g., Bearer <your_access_token>). See the M2M Authentication guide for details on generating this token.
Must be set to application/json.
Body Parameters
The type of authentication flow. Use client_credentials for initial login or refresh_token to renew a session.
The Client ID obtained when creating the API client.
The Client Secret obtained when creating the API client.
Required if grant_type is set to refresh_token. The token used to obtain a new access token.
Response Parameters
The JWT access token to be used in API requests.
The type of token returned (e.g., “Bearer”).
The duration in seconds until the access token expires (typically 25200 seconds / 7 hours).
A token that can be used to obtain a new access token without re-sending credentials.
The duration in seconds until the refresh token expires.
Status Codes
Status Description 200Success. Token issued successfully.400Bad Request. Missing or invalid parameters.401Unauthorized. Invalid credentials or token.
Curl
Client Credentials
Request
curl -X POST "https://api.wizlo.example.com/oauth/token" \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "client-uuid-abc123",
"client_secret": "generated-secret-string"
}'
{
"access_token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"token_type" : "Bearer" ,
"expires_in" : 25200 ,
"refresh_token" : "550e8400-e29b-41d4-a716-446655440000:a3f5b2c8d1e4..." ,
"refresh_token_expires_in" : 2592000
}