Issue Access Token
The following is the method for requesting an access token to access the ZRMZ APIs.
Request URL
url
POST https://api.zrmz.app/api/v1/oauth/tokenRequest Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| grant_type | String | ✅ | Assigns "client_credentials" |
| client_id | String | ✅ | The client ID you received from CMS. |
| client_secret | String | ✅ | The client secret you received from CMS. |
Example
json
{
"grant_type": "client_credentials",
"client_id": "0123456789abcdef0123456789abcdef",
"client_secret": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}Request Example
sh
curl -X POST 'https://api.zrmz.app/api/v1/oauth/token' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_id": "0123456789abcdef0123456789abcdef",
"client_secret": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}'Response
| Name | Type | Description |
|---|---|---|
| token | String | An access token for authentication, used for calling the customer API. |
| expired_at | String | Expiration date of the access token. |
Example
json
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3Mjg0NjYyNzYsImV4cCI6MTcyOTA3MTA3NiwiYXVkIjoiZjZlNzYyOGQ1ZTBmYjY2MDRjZTk5NmM0N2U2NTIwMzciLCJpc3MiOiJaUk1aIiwic3ViIjoiT0F1dGgiLCJqdGkiOiJiYjZhMGQ0OS04MzcxLTQ3OWEtYjRmMi0zODNmZTIyMjczNDgifQ.4rILMnCIysPcOjx7kl2eugODnIDCjxyz3KrusndNyoc",
"expired_at": "2024-10-16T09:31:16.535Z"
}