Inference Access Token

Prev Next

This section provides a guide to obtaining an access token, which is required to authenticate and authorize API requests for secure interactions between AI Modules and the client application.

Get an Access Token for Inference

Endpoint:

URL: {{identityBaseUrl}}/connect/token
HTTP Method: POST
Content-Type: application/x-www-form-urlencoded


Request parameters Description
client_id Unique client id of the generated client
client_secret Unique client secret of the generated client
grant_type client_credentials type of grant is used for authentication


Examples

Here's an example of a request:

curl --location '{{identityBaseUrl}}/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=AIModule_SestekAI_App' \
--data-urlencode 'client_secret=<unique client secret of the generated client>' \
--data-urlencode 'grant_type=client_credentials'


Expected Response:

{
    "access_token": "<accessToken>",
    "expires_in": 86400,  // valid for 1 day
    "token_type": "Bearer",
    "scope": "AIModule"
}