Usage of the Access Token
Regardless of token type, once you have an access_token, your application will include it in API requests to AIRisk to authenticate.
Most commonly, this is done by adding an HTTP header:
Authorization: Bearer <ACCESS_TOKEN>
For example, using a placeholder user token (where /api/GetConversations
is only accessible by users, thus requiring a user token):
or in python:
The AIRisk API will verify the token (and the user context, if any) and then process the request if the token is valid and has the required permissions. If the token is expired or invalid, the API will return an HTTP 401 Unauthorized error (with a status_code
(401) and reason
).
Last updated