Authentication

Getting an access token

All endpoints are secured by default and can be accessed specifying a valid access token on every request.

Access tokens can be issued by the Ochre Auth service: https://auth.ochre.io/oauth2/token

It will require setting a client_id and client_secret as provided by Ochre.

E.g:

curl -X POST -d "client_id=[as provided]&client_secret=[as provided]&grant_type=client_credentials"https://auth.ochre.io/oauth2/token


Access token TTL : 7200 seconds

A new token should be fetched upon expiration.


Calling an API endpoint

All API requests need to include the Authorization header with the token of Bearer type.

E.g:

curl -X GET -H 'Authorization: Bearer [token]' https://api.ochre.io/v1/music/artists