1
votes

I am using Node.js and my bot framework version is 3.3.3. I have already configured "Skype" channel and its working fine. However in case of "Facebook Messenger" I am getting error "No security token sent". I am using ngrok . Here is my configuration of chatBot

var server = restify.createServer();
server.use(restify.CORS());
server.use(restify.queryParser());
server.listen(process.env.port || process.env.PORT || 4000, function() {
  console.log('%s listening to %s', server.name, server.url);
});
// Create chat bot
var connector = new builder.ChatConnector({
  appId: _config.ms.appId,
  appPassword: _config.ms.password
});

var bot = new builder.UniversalBot(connector);

server.post('/', connector.listen());

server.get('/', function(req, res) {
  if (req.query.hub.verify_token === _config.ms.messengerSecret) {
    res.write(req.query.hub.challenge);
    res.end();
  } else {
    res.send('Error, wrong validation token');
  }
});

I have attached screenshots of configuration of webhooks(facebook app) and messaging end point(botframwork).webhook configuration(app)Messaging end point

1
In fact I have tried with updating messaging end point c5dcbaa5.ngrok.io/api/messages but it also didn't work for me. Thanks!Dhiraj Sharma

1 Answers

0
votes

I'm not seeing any errors in our Facebook logs for the bot handle vChat. Lots of reconfiguration ( I assume changing the endpoint for ngrok ) but it doesn't seem like there are any requests making it to us for Facebook channel, or errors showing up in the dev portal.

Are you seeing any fiddler trace of messages leaving your machine?