botframework-sdk: ERROR: ChatConnector: receive - no security token sent.
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
Please let me know the solution of it. Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 25 (10 by maintainers)
I was able to fix this error by providing the APP_ID and PASSWORD in the emulator.
This may be obvious but the docs say this isn’t typically required for local connections:
https://github.com/Microsoft/BotFramework-Emulator/wiki/Getting-Started#connect-to-a-bot-running-on-localhost
I will submit a pull request to fix the docs
Edit: Sorry can’t fix as this is a wiki page:
ERROR: ChatConnector: receive - no security token sent.
@juharris please open a top level issue for your question, and feel free to reference this closed issue.