Authorisation
This tutorial will walk you through obtaining access to the Management API.
Before you Begin
As part of the Management API onboarding process, you should have been provided with the following details:
-
client_id:Required for authorization. -
client_secret: Required for authorization. -
environmentId:Required for creating new tenants.
These are not the same client_id and client_secret you were provided for accessing other Sovrin API APIs, but rather unique credentials for accessing the Management APIs.
If you have not received these credentials or have any questions, please contact us before proceeding.
Obtaining an access token
To obtain a Management API access token, make the following request to the authorisation provider using your Management API client_id and client_secret:
Request
POST https://sovrin-auth-prod.au.auth0.com/oauth/token
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"audience": "https://manage.sovrin.network",
"grant_type": "client_credentials"
}
Response
{
"access_token": "YOUR_ACCESS_TOKEN",
"expires_in": 14400,
"token_type": "Bearer"
}
Use the returned access_token as the bearer token for all subsequent requests to the Management API service.
Refer to the authorisation section of the API Reference for more information.
What's Next?
You can now use your access token to Manage tenants and List environments.