Getting the authorization code
To begin the authentication process, redirect the user to the authorize endpoint, passing the following parameters:| Parameter | Description |
|---|---|
| client_id | The application identifier. For information on how to create a Vantage API Client (client_id and client_secret), see the Managing Tenant Vantage API Clients article. |
| redirect_uri | The URL of your application or website that is used to redirect the browser once access permissions have been granted. |
| response_type=code | Specifies that the authorization code response type is used. |
| scope=openid permissions global.wildcard | Specifies the permission scope. |
| state | An arbitrary string value that will contain the authorization result in the response. |
| code_challenge | Digitally signed value of the code_verifier code (using the code_challenge_method method). |
| code_challenge_method | The digital signature method for the code_verifier code (S256). |
| productId=a8548c9b-cb90-4c66-8567-d7372bb9b963 | The Vantage identifier. |
The values for response_type, scope, productId should be exactly as specified above. These keys, except response_type, are subject to change. Consider keeping them in configuration.Sample Request
- Managing data catalogs in the Vantage tenant on behalf of the user,
- Accessing skills in the Vantage tenant on behalf of the user,
- Creating and accessing Vantage transactions on behalf of the user.
Getting the authorization token
Once you have obtained the authorization code, you have one minute to exchange it for the access token. Use a POST request to the token endpoint withapplication/x-www-form-urlencoded data.
Request body parameters:
| Parameter | Description |
|---|---|
| code_verifier | The code that you have generated. Needed to confirm the initiation of the authorization request. |
| client_id | The application identifier. |
| client_secret | Secure application key. |
| code | Your authorization code obtained from the server. |
| redirect_uri | The redirect URL used in the authorize step. |
| grant_type=authorization_code | Specifies that the authorization code grant type is used. |
| scope=openid permissions global.wildcard offline_access | Specifies the permission scope. To get a refresh token, add offline_access to the scope. |
token with the value you received:
Getting the refresh token
If theAllow issuing refresh tokens to refresh access tokens option was enabled when configuring the Vantage API client and the request for getting the access token contained the scope=openid permissions global.wildcard offline_access parameter, you will also receive an additional refresh token in the response. Once you have a refresh token, you can refresh the access token using a POST request to the token endpoint with the following parameters:
| Parameter | Description |
|---|---|
| client_id | The application identifier. |
| client_secret | A secure application key. |
| refresh_token | Your refresh token obtained from the server. |
| grant_type=refresh_token | Specifies that the refresh token grant type is used. |
Token lifetimes
Access and refresh tokens are configured to have the following lifetimes:- Access token lifetime: 24 hours. Period of time during which the issued access token is valid.
- Refresh token lifetime: 30 days. A refresh token is issued after the initial authentication along with the first access token. While the refresh token is active, it can be used to obtain new access tokens. The refresh token cannot be extended. You can only obtain a new one through reauthentication.
