We received the following error while trying to use the Data Insert API:
“msg”: “Invalid SDK credentials”,
The Details of the API Call:
HTTPS Method: POST
“defaultFullName”: “John Doe”
- auth JWT_TOKEN using below defined apps client Id.
- content-type application/json
An App was defined within the Data Tab with all permissions on the table. I tested this using Postman.
Hello @rahul ,
If the API is failing with postman, it is clear that the jwt used is incorrect or does not have required permissions to access Data Tables. As indicated in the documentation:
“To use this API, the app needs to be given Write access to the Data Table from the Data Definition in DaaS”
I.e, the data table should have been already created and assigned to the bot, and linked to app with the relevant permissions.
Ensure these permissions are assigned, before testing the API. Hope this resolved your issue.
I have Created an App as follows:
I have also permissioned the app to have all permissions in the Data Table Definition as follows:
I generated the JWT using https://developer.kore.ai/tools/jwt/
The error still persists.
I would also like to know if the host URL I am using (bot.kore.ai) is correct or not for these data updates on a table existing in a developer account.
Hello @rahul ,
We have resolved the issue with the API over a ticket.
1. Invalid credentials - was due to not using the secret code to generate the jwt.
2. Invalid arguments - was observed later, and fixed after ensuring all the default headers are
Let us know if you have any other concerns.
Thank you @sameera.tumuluri for your quick response in resolving the issue.