Unable to Set Up web SDK in my local


(Jaywant Topno) #1

I have a requirement to Add kore.ai chatbot with Drupal 8 Application.

Have followed the instruction available in community.kore.ai, I was able to make communication between the local & Bot platforms. But I’m facing issues when I place the web SDK folder in my Drupal repository.

not sure whether my understanding to integrate ChatBot on our website is in right way or not …?


(Swagat) #2

@jaywant
What is the error or issue you are facing on integrating with drupal repository?
Note - Kore uses some jwt service to authenticate. If that service is up and all the JS libraries etc are in right relative path to index.html it should work.


(Jaywant Topno) #3

Hi @swagata.sengupta

In my case requirement is to add ChatBot through out the site. not Just in Home page.
Do i need to send JWT to the server for Authentication. If yes then please provide your suggestion.

Do i need to move web-kore-SDK to my Drupal repo. where i need to install nodejs & required dependency through NPM.


(Swagat) #4

@jaywant
If you already have a JWT service running, you do not need to have nodejs etc installed to use web-sdk. In kore-config.js, all you need to do it pass that JWT URL in botOptions.JWTUrl.

You will need the entire web-sdk along with index.html so that no references are broken.

Note - default behaviour of the bot is to connect afresh from every page you implement. You may need to go through the web-sdk code to understand how the events etc are called if you want to keep chat session alive across pages. This is not an out of the shelf code/ feature/ configuration yet.


(Jaywant Topno) #5

@swagata.sengupta
I’m able to integrate my Chatbot with my application(Drupal) & it’s able to communicate with bot platform. Bot is responding in very well manner.

just a query on JWT url, I have setup as "http://demo.kore.net:3000/users/sts "

Ref url: https://developer.kore.ai/docs/bots/sdks/kore-ai-web-sdk-tutorial/


(Swagat) #6

@jaywant
Good to know that. But we do not encourage you to use kore JWT. We do not provide JWT service and it is implicit that users have their own sts service. It can go down anytime and is not scaleable.

You can get an example code in https://s3.amazonaws.com/static-kore/downloads/SDKApp.zip see users route. It uses a node module for jwt. This is a test code.
Refer: https://developer.kore.ai/docs/bots/sdks/kore-ai-web-sdk-tutorial/