Authentication

Secret Key Authentication

To authenticate the calls to our API, in each request the client should pass the provided token key in the Authorization HTTP header, prepended with the string Token .

Header example:

Authorization: Token 5a767bf0a0ff60507d351308ed42e16c9fe81d8b

Bearer Token Authentication

  1. Getting the access token

To get the access token to authenticate the requests to our APIs, the client should make a request to the endpoint /service/accounts/user/openid/token/, using the application/x-www-form-urlencoded format, with the following data in the request body:

client_id: <value provided for each client>  
client_secret: <value provided for each client>  
grant_type: client_credentials

If the request is successful, then the response will contain an access_request property with the token that would allow access to the resources in the APIs.

  1. Using the token

With the token obtained in the previous step, you can authenticate each request to the resources in the APIs, passing that token in the header like this:

Authorization: Bearer <token_from_previous_step>