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:
https://test-discourse.kore.ai/t/bot-variables-how-to-create-and-where-to-use/256