Get Access Token for Training

Prev Next

An access token must be obtained by providing client credentials to be utilized for API requests in the following steps:

  • Adjust/Update Generative QA Training Settings
  • Send Training Request
  • Check Training & Inference Status
  • View Generative QA Data


Token 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


Here's an example of a request:

curl --location '{{identityBaseUrl}}/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<unique client id of the generated client>' \
--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": "SestekAI_External"
}