authorization header.md
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.
Get and use an Authorization Token
To gain access to our API, you need a valid token in an Authorization header. The token is granted by our API in exchange for a Client ID / Client Secret pair. This can also be handled by third party OAuth client libraries.
Example Python request (replace CLIENT_ID and CLIENT_SECRET):
{% code fullWidth="false" %}
import requests
data = {
'grant_type': 'client_credentials',
}
response = requests.post('https://api.certn.co/token/', data=data, auth=('CLIENTID', 'CLIENTSECRET'))
{% endcode %}
- Replace
TOKENwith your API key in the following header:
{ 'Authorization': 'Bearer TOKEN' }
{% hint style="info" %} Include this header in every call to our API, and keep it secure. It is your access key. {% endhint %}
Token lifespan
Token lifespan is indicated by the expires_in parameter returned when a new token is requested. The default value is 36000 seconds (10 hours).