Sending events from an embedded webchat

后端 未结 1 1314
天命终不由人
天命终不由人 2021-01-21 01:37

I\'m trying to send and receive events from an embedded webchat which follows the code for the website from this example https://github.com/ryanvolum/backChannelBot and the bot

1条回答
  •  無奈伤痛
    2021-01-21 02:13

    I re-created your project and published it to Azure: http://QuickBackChannelEventTest.AzureWebsites.net/index.html

    I posted the code on GitHub. You'll need to change the MicrosoftAppId and MicrosoftAppPassword in the web.config, and add your bot's Direct Line secret to the index.html page's BotChat.DirectLine creation:

    var botConnection = new BotChat.DirectLine({
                secret: '**DIRECT_LINE_SECRET**',//params['mysecret'],
                //token: params['t'],
                //domain: params['ngroktunneledurl.com/api/messages'],
                webSocket: params['webSocket'] && params['webSocket'] === "true" // defaults to true
        });
    

    I also added a folder called TestStandAlone that contains only Index.html, botchat.css and botchat.js: https://github.com/EricDahlvang/BackChannelEventTest/tree/master/TestStandalone This works as expected once the the Direct Line secret for the bot is set.

    0 讨论(0)
提交回复
热议问题