Hi team, i am trying to integrate a sample bot into my web application. i have followed the steps as defined here GitHub - Koredotcom/web-kore-sdk: web client sdk code . When i run my application i do see the below error
@kamalakannanvkp This error message is returned by the jwt grant API when the assertion (JWT) which is passed as the request payload doesn’t have the client ID in it. Could you please decode the generated JWT and see if it has the client ID in it?
As you can see the claims [HashMap] contains the client Id in the request .
Also when i try to decode the jwt Token generated i could see the client Id in the paylod
i am trying to decode the below generated JWT TOKEN:
I am connecting via the webSDK and I am hitting the JWT endpoint with below Form data:
clientId=cs-198306ba-b34d-5e4c-addc-9858685a653f&clientSecret=%2B4XAoTie7KSHMEObUAntn2R36mn7DaiGjheJAidzd%2Fo%3D&identity=subbu&aud=&isAnonymous=true
I ve changed as per the suggestion, below is the new error
and the token generated is
{“token”:“eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0IiwiY2xpZW50SWQiOiJjcy1kNmNkMjI3NC1jYjllLTVjYTEtYWM3Mi05OGVmNzA1ZGY0ODYiLCJib3ROYW1lIjoidGVzdCIsImlzcyI6ImNzLWQ2Y2QyMjc0LWNiOWUtNWNhMS1hYzcyLTk4ZWY3MDVkZjQ4NiIsImV4cCI6MTU0OTM2MzM1OSwiaWF0IjoxNTQ5Mjc2OTU5fQ.Zlo-qb2fYF8aWRLgWJxhbehIbIpaloeZeDTLFx8T42Q”}
@kamalakannanvkp The below error could possibly be because of the user identity. Could you please confirm if the identity being passed to JWT endpoint?
I suspect that you are trying to access a bot which has not been published yet with identity of someone who is not registered on the Kore.ai bots platform.
If we are trying to access a private bot (Bot which has not been published) , try to connect using email id of bot developer by passing the same as identity to the JWT .
If the bot is already published and its of purpose “Consumer”, the identity of user can be anything.
If not, could you please create a new app, update the channel, republish the bot, update the iOS SDK client for new client ID and secret and give it a try?
@kamalakannanvkp As agreed upon, the issue seems to be resolved with a change in the app and also the iOS SDK configuration. Do let us know if you come across any other issues.