ryanvolum / offline-directline

Unofficial package to emulate the bot framework connector locally.
https://www.npmjs.com/package/offline-directline
78 stars 44 forks source link

How to connect to web chat v4 ? #47

Open mouhannadali opened 5 years ago

mouhannadali commented 5 years ago

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

kid101 commented 4 years ago
`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
      );`