Creating an access token in Kaspersky Security Center
April 11, 2024
ID 204469
An access token is a unique sequence of characters (letters, digits, and special characters) that authorizes you to use the methods of the REST API.
To create an access token:
- In the MDR section of Kaspersky Security Center, click the API tab.
The API connections list appears.
- Click a connection with a Pending activation status.
A block containing the connection information 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.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.
You can also create an access token in MDR Web Console.