I have a bot that works locally when using the emulator but if I try to use the WebChat or Skype. It will only work one way (Meaning, the request comes in from webchat and skype but the response back to them does not go). My code is more complex but I get the same response when I use the code below.
var restify = require('restify');
var builder = require('botbuilder');
//=========================================================
// Bot Setup
//=========================================================
// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat bot
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
var bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
server.get('/', restify.serveStatic({
directory: __dirname,
default: '/index.html'
}));
//=========================================================
// Bots Dialogs
//=========================================================
bot.dialog('/', function (session) {
session.send("Hello World");
});
I am using NGrok to point to my local machine and use the Ngrok url as the messaging endpoint. As you can see, testing the bot comes back as accepted.
I am using VSCode in Debug mode and attaching so that I can step through. If I run from the emulator, It is caught, I can debug through and receive back the "Hello World" sent from the
session.send("Hello World");
If I try from Skype or Webchat Channels. It hits the endpoint, runs through the code like the emulator. But the session.send does not return anything to Skype or the webchat (at least nothing shows up)
If I look at the traffic. The difference between the two (emulator vs others) is that
1) I get both a 202 Accepted AND a 100 Continue (No 100 continue from skype or webchat) 2)The Authorization Bearer has a token in it. The same thing happens if I load it to azure and run it from there.
any help would be appreciated.

