botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Question] Connect bot to custom chat window

Open sachinsbucket opened this issue 9 years ago • 5 comments

I have created a bot program in node.js using microsoft bot framework. Now I want to connect that bot program with my custom chat window UI (index.html) built in HTML ,CSS & JS. I have already created a local express server. Can anyone guide me on how to integrated it as when user send some message on chat window it connects to bot and bot should send the reply back. Please help as I am new to this.

sachinsbucket avatar May 04 '17 15:05 sachinsbucket

You can find detailed instructions for embedding the web chat module in your website here: https://github.com/Microsoft/BotFramework-WebChat

Additional guide here: https://docs.botframework.com/en-us/support/embed-chat-control2/

nwhitmont avatar May 04 '17 15:05 nwhitmont

Thanks @nwhitmont . But I don't want to register it and run it under azure/microsoft. I want to connect bot with my custom chat window and use the functionality. There can be some rest api calls or function I need to write. But I am facing problem because the bot framework expect message in a particular JSON format with channel id/conversation id and when I dont give it , it reply saying toket not provided.

sachinsbucket avatar May 04 '17 16:05 sachinsbucket

@sachinsbucket , sounds like you are looking for Direct Line, which allows you to configure your own web chat or communicate with your bot via other apps.

DirectLineJS Client/Server: https://github.com/Microsoft/BotFramework-DirectLineJS

DirectLine Example Code: https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-DirectLine

nwhitmont avatar May 04 '17 17:05 nwhitmont

@nwhitmont Do I need to register my bot on Microsoft bot framework to use DirectLineJS Client/Server?

sachinsbucket avatar May 04 '17 18:05 sachinsbucket

@sachinsbucket yes, all bots require app id and password registered via MS Dev Apps portal in order to work with the connector service, which is what allows your bot to communicate with the Direct Line channel.

nwhitmont avatar May 04 '17 19:05 nwhitmont