Sam
Sam

Reputation: 1

Which key to use in Bot.App secret property, one from Direct Line or Web Chat Channel?

I have configured a Web Chat Channel and a Direct Line Channel on Azure Bot Service. I am using the web chat control on the client side i.e. on a web page to provide a UI to users. For now I am using the Web chat control as it is i.e. included botchat.js in html served from my local server and also botchat.css which I have modified to give a custom look n feel.

There will be requirement in future where I might have to create a custom build of Web Chat control source code, to reduce the overall size of botchat.js file and do some custom implementation as well. My question is it right way to use the UI for a website. Please share your experience and best practice for the same. Are there any other ways to do UI for Website, because I want to support the flexibility of displaying various types of responses like text, video, hero cards etc.

Also, for now I am passing the secret key in the BotChat.App code, but I am confused which secret key to use, the one from WebChat Channel or DirectLine Channel.

Upvotes: 0

Views: 404

Answers (1)

To answer your initial question and per the official documentation found here (I'd recommend checking it out as well):

The Web Chat channel in the Bot Framework Portal contains everything you need to embed the web chat control in a web page. All you have to do to use the web chat control is get your bot's secret key and embed the control in a web page.

This refers to the WebChat channel this is of course if you were referring to connect your bot to Web Chat, Directline has the following purpose:

You can enable your own client application to communicate with your bot by using the Direct Line channel.

When it comes to UX/UI, I'd recommend the following blog post which provides some best practices and examples related to the area.

Upvotes: 1

Related Questions