offline-directline icon indicating copy to clipboard operation
offline-directline copied to clipboard

How to connect to web chat v4 ?

Open mouhannadali opened this issue 5 years ago • 1 comments

Hi, I couldn't mange to connect offline-direct line to BotFramework-WebChat (v4). Any suggestion ?

mouhannadali avatar Jul 29 '19 11:07 mouhannadali

`const botContainer = document.getElementById('botContainer');
    botContainer.classList.add("wc-display");
    const params = BotChat.queryParams(location.search);
    window.WebChat.renderWebChat(
        {
          directLine: window.WebChat.createDirectLine({
            secret:'' ,
            token: '',
            domain: params['domain'],
            webSocket: false // defaults to true
        }),
          userID: 'web ID',
          username: 'Web Chat User',
          locale: 'en-US',
          resize: 'detect',
          chatTitle: "SAMPARK",
          botAvatarInitials: 'WC',
          userAvatarInitials: 'WW'
        },
        botContainer
      );`

kid101 avatar Mar 26 '20 19:03 kid101