GuidesRetrieve an access token

How to get an access token

Before you can make any API requests to your MATTR VII tenant, you must complete authentication by obtaining an access token from our authentication provider.

Prerequisites

If you have not received these details or have any questions, please contact us before proceeding.

Request

Use your login credentials to make a request of the following structure:

HTTP
POST https://{auth_server}/oauth/token

Note that this URL is different to your tenant_url. auth_url is only used for obtaining an access token, while tenant_url is used for all other requests to your tenant.

JSON
{
    "client_id": "F5qaeLDdbvnU9zhA0j4eHUGCHwC1bKtt",
    "client_secret": "Wzc8J**********************************************************",
    "audience": "https://learn.vii.au01.mattr.global",
    "grant_type": "client_credentials"
}
  • client_id : Replace with the client_id value from your login credentials.
  • client_secret : Replace with the client_secret value from your login credentials.
  • audience : Replace with the audience value from your login credentials, prefixed with https://.
  • grant_type : Always use client_credentials as a static value, regardless of your specific login credentials.

Response

JSON
{
    "access_token": "eyJhb********************************************************************",
    "expires_in": 14400,
    "token_type": "Bearer"
}

The returned access_token value must be used included as a bearer token in the header of all subsequent requests to protected resources on your tenant.

This access token will enable access to endpoints as per the role assigned to the client. Refer to Access control for more Information.