Introducing API Scopes

You can now access your Kore.ai bots through secure APIs. With the release of R6.2.1, key bot features like intent and entity detection, bot synonyms, ML utterances and chat logs can be accessed via APIs.

  • From your Kore.ai Bot Builder, proceed to API Scopes under Apps & Agents menu.
  • Click ‘New’ to define new API scope definition
  • Select an app or create a new app. Select the required API scopes and save the mapping

Once mapping is created, you can start accessing the platform APIs using the credentials of the selected app. Refer our knowledge base for more details on API specifications.

1 Like

I am getting “msg”: “Invalid SDK credentials” ,“code”: 4002 when I try to access this API scope to get my widget data . I have used the below GET URL

https://{{host}}/api/public/bot/{{BotID}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}}&limit=-1

If you are referring to Get Dashboard Widget Data - Kore.ai Documentation please ensure your curl is in right format and has right JWT.

curl -X GET \ https://{{host}}/api/public/bot/{{bot_id}}/dashboard/{{dashboardName}}/widget/{{widgetName}}?startDate={{startDate}}&endDate={{endDate}} \ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json' \
For generating JWT token please check

Could you tell the payload to be entered while generating the JWT token.

Did you check this? Sample payload is provided.
https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/

Should we follow the same payload format?
Because I have given just the clientID in my payload

Please use the same format. However, JTI and AUD are not mandatory and are needed for security features.

“jti”: “1234”, //or kore_jti
“aud”: “https://idproxy.kore.ai/authorize”,

You will need client secret to sign the JWT on jtw.io

I tried generating the JWT as you mentioned .jwt With generated JWT token which I tried to make a GET request through postman postmanWidgetRequest where I specified botId,dashboardname,widget name etc and in the header I passed the token generated in JWT. But I am still receiving Invalid SDK credentials

In the payload try using “appId” instead of “iss”.
Hope you signed the jwt with right client secret.