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
- Login credentials provided as part of your onboarding process.
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
auth_server
: Replace with theauth_url
value from your login credentials.
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": "learn.vii.au01.mattr.global",
"grant_type": "client_credentials"
}
client_id
: Replace with theclient_id
value from your login credentials.client_secret
: Replace with theclient_secret
value from your login credentials.audience
: Replace with theaudience
value from your login credentials.grant_type
: Always useclient_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.