Bot Analytics Api

I am new to kore.ai. I am working on devops solution for Kore AI in our company and facing issue while getting bot history doing exactly same as wriiten in docs. Generated awt token also but i am geeting this please can you tell me what could be the possible reason.

{
“errors”: [
{
“msg”: “Invalid SDK credentials”,
“code”: 4002
}
]
}

for Get api: https://{{host}}/api/public/bot/{{BotID}}/getMessages?userId={{userID}}&skip=10&limit=10

for these environment variables:

Bot Id: st-12bb850c-3a90-553f-a571-010902c0f008
User Id: u-49e8841b-088b-5156-8fd0-c15c34d0d0c9
host: bots.kore.ai

Dear @caditi009 ,

The error “Invalid SDK credentials” arises when using an incorrect Auth Token or Client and Secret.

Are you still observing this issue?

Regards,
Kore.ai Community Team.

this issue is resolved i am not able find connection between type=incomming and type=outgoing for below jsonobjects this is the output of history api of kore.ai
api = https://{{host}}/api/public/bot/{{BotID}}/getMessages?userId={{userID}}&limit=20

need to find out the intent matched with user query.
also please mention the difference between clusterId and tn in below objects.

{
“_id”: “ms-0884ac25-c871-5a48-affd-0f0ecfc356af”,
“channels”: [
{
“type”: “rtm”,
“channelUId”: “caditi009@gmail.com
}
],
“type”: “incoming”,
“status”: “received”,
“createdBy”: “u-49e8841b-088b-5156-8fd0-c15c34d0d0c9”,
“lmodifiedBy”: “u-49e8841b-088b-5156-8fd0-c15c34d0d0c9”,
“createdOn”: “2022-07-31T14:20:42.700Z”,
“lmodifiedOn”: “2022-07-31T14:20:42.700Z”,
“botId”: “st-12bb850c-3a90-553f-a571-010902c0f008”,
“orgId”: “o-17bb173d-5f2a-5ddc-8ed0-4238ff3951f6”,
“accountId”: “62dfb9fb54944e16e70a65c2”,
“isBB”: 1,
“ms”: 1,
“chnl”: “rtm”,
“isD”: 1,
“components”: [
{
“_id”: “cp-390e45c8-3f2c-548a-8ecd-0df7ccbf05a9”,
“cT”: “text”,
“data”: {
“text”: “Get my account details”
},
“thumbnails”: []
}
],
“timestampValue”: 1659277242742,
“__v”: 0,
“lang”: “en”,
“sT”: 1,
“sessionId”: “62e68fad8f36fe3f682bd3de”,
“cluster_id”: “get account info”,
“resourceid”: “messagestore”,
“tags”: {
“messageTags”: [],
“userTags”: [],
“sessionTags”: []
}
},
{
“_id”: “ms-d5ef0878-11da-5291-b861-434a3e0421b3”,
“channels”: [
{
“type”: “rtm”,
“channelUId”: “caditi009@gmail.com
}
],
“type”: “outgoing”,
“status”: “pending”,
“createdOn”: “2022-07-31T14:20:43.365Z”,
“lmodifiedOn”: “2022-07-31T14:20:43.365Z”,
“createdBy”: “u-49e8841b-088b-5156-8fd0-c15c34d0d0c9”,
“components”: [
{
“_id”: “cp-9f0309c1-f50c-5c3a-acc2-c9a9f1f75626”,
“cT”: “text”,
“data”: {
“text”: “I am unable to find an answer. Please try something else.”
},
“thumbnails”: []
}
],
“botId”: “st-12bb850c-3a90-553f-a571-010902c0f008”,
“orgId”: “o-17bb173d-5f2a-5ddc-8ed0-4238ff3951f6”,
“accountId”: “62dfb9fb54944e16e70a65c2”,
“tN”: “Fallback Task”,
“isBB”: 1,
“ms”: 1,
“chnl”: “rtm”,
“isD”: 1,
“lang”: “en”,
“timestampValue”: 1659277243367,
“__v”: 0,
“sT”: 1,
“sessionId”: “62e68fad8f36fe3f682bd3de”,
“resourceid”: “messagestore”,
“tags”: {
“messageTags”: [],
“userTags”: [],
“sessionTags”: []
}
},

Dear @caditi009 ,

Glad to know that the issue is now resolved.

Based on the JSON response, I see below details:

User Input/Message to the bot (type=incomming):

“data”: {
“text”: “**Get my account details**”
},

Bot Response/Message to the user - (type=outgoing):

“data”: {
“text”: “I am unable to find an answer. Please try something else.”
},

You may compare the above flow/data in the Analyze > NLP Insights > Intent Not Found section in the bot builder.

Also, regarding the parameters:

“tN”: “Fallback Task”,

“tN” - Refers to Task Name (In this case it is Fallback Task)

And,

“cluster_id”:

ClusterID is a flag used for internal reference for conversation metrics by Chat Script service in the platform.

Hope this helps.

Regards,
Kore.ai Community Team.

Actually i am working for kore.ai project in my organization and i need to find out the intent matched with the user query. from the above history API JSON output I have concluded that incomming type object in JSON array is a userQuery object and outgoing is related to bot question/answer to user query. So i want to know how i can find out the intent matched with the user query.

Dear @caditi009 ,

We would recommend you to review the NLP Insights section of the bot builder that show the Intent Found and Intent Not Found details.

Hope this helps.

Regards,
Kore.ai Community Team.