Request#
Use Complyt API to obtain Auth0 bearer token. To do this, you’ll need to send a POST request to complyt token endpoint, passing your client ID and client secret in the request body. Here’s an example cURL command to do this:curl --request POST \
--url 'https:
--header 'content-type: application/json' \
--data '{
"clientId": "A414......................GsFf87t",
"clientSecret": "HHCv..............gQ491nSVed35"
}'
Replace the placeholders with your actual client ID and client secret. Response#
If the request is successful, you’ll receive a JSON response that includes an access token. The access token is your bearer token, which you can use to authenticate requests to your M2M application’s API. Here’s an example response:{
"accessToken":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType":"Bearer",
"expiresIn":86400
}
That’s it! You can now use the access token as a bearer token to authenticate requests to your M2M application’s API. Please note that the token expires in 24 hours, so either re-generate it with every request or re-generate it daily.
The token expires in 86400 seconds (24 hours), consider either:
Re-generating the token with each request
Implementing a mechanism to refresh the token daily