Creating an access token in MDR Web Console
11 April 2024
ID 258285
To create an access token:
- In the MDR Web Console window, navigate to the Settings menu item.
- Click the API tab.
The All tokens list appears. Each line represents one token. You can click anywhere on the line to view token information.
- Click a token with a Pending activation status.
A Token info block appears.
- In the JWT token field, click the Refresh button.
A refresh token appears.
- Select and save the value from the Client ID field.
- Select and save the token's sequence of characters to the clipboard.
- Send a POST request to the
/session/confirm
endpoint (see the examples below).Replace
{client_id}
and{refresh_token}
with the values selected and saved in the previous steps.
Example (Python):
|
Example (Shell):
|
The REST API sends a response with the access token and a new refresh token:
{
"access_token": "SamPLET346yoKEnSamPLEToK25EnSamPLEToK35EnS",
"refresh_token": "tOKenSaMPlet259OKenS123aMPle926tOKenSaMPle"
}
Now, you can send requests to the REST API by using the access token. Each request to the REST API requires an access token; a request without an access token will return an authorization error only.