I am making a custom bot, using the Bot Framework, for Microsoft teams. I am currently hosting the bot locally and tunneling through ngrok, and I'm using the /api/messages URL. I have registered the bot with the bot framework, and put the bot handle in BotId, app ID in MiscrosoftAppId, and app password in MicrosoftAppPassword in my Web.config. The Teams channel is enabled and has status "Running" on the Bot Framework page. The bot runs on the emulator, and runs on the test connection on the Bot Framework page, but it does not run in Microsoft Teams.
This is what is being sent to my bot:
"type": "message",
"id": "1497620296742",
"timestamp": "2017-06-16T13:38:19.303Z",
"localTimestamp": null,
"serviceUrl": "https://smba.trafficmanager.net/amer-client-ss.msg/",
"channelId": "msteams",
"from": {
"id": "29:1F9b3IgxC3x5ynp7nVxdSQ0bQ9MNyf7uKDZHrrCfRLyBbjOmdWSY4gyFLuR8cTRFmbXOeDN4f_uI65xSem6M5OA",
"name": "Ronnei, Evan T"
},
"conversation": {
"isGroup": true,
"id": "19:[email protected];messageid=1497558943513",
"name": null
},
"recipient": null,
"textFormat": "plain",
"attachmentLayout": null,
"membersAdded": null,
"membersRemoved": null,
"topicName": null,
"historyDisclosed": null,
"locale": null,
"text": "Test Bot",
"summary": null,
"attachments": [
{
"contentType": "text/html",
"contentUrl": null,
"content": "<div><span itemscope=\"\" itemtype=\"http://schema.skype.com/Mention\" itemid=\"0\">Test Bot</span></div>",
"name": null,
"thumbnailUrl": null
}
],
"entities": [
{
"type": "clientInfo",
"locale": "en-US",
"country": "US",
"platform": "Windows"
}
],
"channelData": {
"teamsChannelId": "19:[email protected]",
"teamsTeamId": "19:[email protected]",
"channel": {
"id": "19:[email protected]"
},
"team": {
"id": "19:[email protected]"
},
"tenant": {
"id": "a9691d3f-49e3-46a8-8b23-ddad274d0523"
}
},
"action": null,
"replyToId": null,
"value": null,
"name": null,
"relatesTo": null
And it's giving me this 401 Unauthorized error:
BotAuthenticator failed to authenticate incoming request!
I'm very much a beginner when it comes to all of this stuff. I followed the available tutorials on the Bot Framework documentation, but it still doesn't work on Teams. I'm sort of stuck at this point. Let me know if there's any more information that I should provide.
Apparently I don't have enough reputation to post more code... So here's my manifest.json: https://pastebin.com/xK7y2VHX