When you create an API token, the confirmation dialog displays a Client ID and Client secret. To authenticate using an API token, you must these values to obtain a short-lived JSON Web Token (JWT) token from Auth0. To get the JWT:
- Run the following command in your
terminal:
curl -X POST "https://auth.bluecathorizon.com/oauth/token" \ -H "Content-Type: application/json" \ -d '{ "grant_type": "client_credentials", "client_id": "<M2M_CLIENT_ID>", "client_secret": "<M2M_CLIENT_SECRET>", "audience": "https://bluecathorizon.com" }'
The JWT lasts for a duration of fifteen (15) minutes. If the API token used to obtain this JWT gets disabled or expired, the JWT can still be used for 60 seconds after the disabled/expired timestamp. After 60 seconds, the JWT cannot be used.