I am trying to use the conversation API but receiving “msg”: “Invalid SDK credentials”, “code”: 4002.
I followed the steps to given on below link
→ " Associating API Scopes to a Client App from Bot Builder",
→ Generated JWT token using client, secret
-? use conversation api from bot builder service node/soap ui but getting above error. please see the attached screen shot.
Please inform if I’m doing anything wrong or if anything is missing.
Unfortunately it gives same issue, the error is consistent with all other apis that i tried just to see if anything else is working. For testing purpose, can you please suggest any basic api that most probably should work ? Also inform if you think these might be needing something else to make it working.
I have quickly enabled the API scope for a bot I use on our Prod instance and published it. Below is the cURL you could try to retrieve the conversation history:
curl -X GET
‘https://bots.kore.ai/api/public/stream/st-0833d730-2bd0-5728-b643-709cd15b11ec/getMessages?userId=u-83975241-3597-5e27-8be3-9e380312ab29&limit=2’
-H ‘Accept: /’
-H ‘Accept-Encoding: gzip, deflate’
-H ‘Cache-Control: no-cache’
-H ‘Connection: keep-alive’
-H ‘Content-Type: application/json’
-H ‘Host: bots.kore.ai’
-H ‘Postman-Token: 80ecc094-0956-4319-ad12-d98deca57503,92b9145b-b22d-455a-9192-880fba13f77a’
-H ‘User-Agent: PostmanRuntime/7.19.0’
-H ‘auth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiYXBwSWQiOiJjcy1hYjRkYWExOS0wNGM2LTU0MWQtOTEzZi1lODI2NThkMDRjNDgifQ.36jex1L4bqkk6ic3q7TJ2aNn5igD4bvTVFfC42SoDPQ’
-H ‘cache-control: no-cache’
Below are some follow up questions I have to make sure the config is right to get the response from conversation history API:
Is the API scope Chat History selected while subscribing it with created application?
Were the API scopes and the bot published and approved?
Would you be able to provide us with your cURL so that we could debug the issue further?
Is the API scope Chat History selected while subscribing it with created application?
Yes, Please see attached screen
Were the API scopes and the bot published and approved?
Yes, Please see attached screen. In this version, when i publish, it does not specifically show me if scope if going to be published or not. But I did publish couple of times after creating the scope.
Would you be able to provide us with your cURL so that we could debug the issue further?
@Subrahmanyam
Unfortunately its giving me the same error. Please see the curl below, Not sure what might be going wrong here. let us know if you think something is missing.
Sorry to hear that. I’ll coordinate with our support team to schedule a call with you soon to have the issue sorted out. Have you had a support ticket raised for this issue?
Thanks Sadhvi, it’s still the same. But we have prioritized other features as of now.
We will have to work on this chat history feature in January. Please raise the ticket but we will have to work out for scheduling the call as we have other priorities for now.