This section provides a guide to obtaining an access token, which is required to authenticate and authorize API requests for secure interactions between Knovvu ML and and the client application.
Get an Access Token for Training
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=<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"
}
