How to access bot variables from bot kit?

Bot variables present at bot can be fetched into bot kit by using the below end-point.

https://bots.kore.ai/api/botsdk/stream/{{stream_id}}/getBotVariables

This API needs JWT in the header. Please find the sample curl below:

curl -X GET
https://bots.kore.ai/api/botsdk/stream/{{stream_id}}/getBotVariables
-H 'auth: eyJhbGciOiJIUzIXXXXXXXXXXXXXXXY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.WcHsYja3RFfu7X_HoltHBurJ6Bazc5pDkuDB1sJuD60' \
-H 'bot-language: en'
-H ‘cache-control: no-cache’
-H ‘content-type: application/json’
-H ‘postman-token: 3fa6e6a0-5bcd-2250-b709-21ad8d1b3af9’

Please note that to fetch locale variables present at any language enabled at the bot, the language has to be passed in the header to the API.

Please refer to below post on details on creating and accessing bot variables for more details:

2 Likes

Hi I am working on koreAi project in my firm. Can you help me is there any way i can have date of creation of a bot. It would be very helpful if you can answer to my query.