Search code examples
botframeworkmicrosoft-teamsngrok

Getting errors after adding the Bot in Teams


I'm getting errors after adding the BOT in teams. I have created a simple Hello default bot using the MS Teams Toolkit and Vs Code. The best part is whenever i'm creating any BOT and try to run it in Bot emulator then it is working fine which is on localhostwith 200 ok response but not in teams either i'm getting 404 or 500 in POST requests.

Can someone please help and through some light and tell me what i'm doing wrong here or what could be the possible cause of the errors.

  1. ng-rok error log enter image description here

Solution

  • Your bot looks like it's configured to reach your ngrok environment properly, so that's good, but it looks like the path is incomplete. You need to tell the Bot Framework the full path to the actual running endpoint in your app - it's usually something like https://[something].ngrok.io/api/messages, like the below screenshot: enter image description here

    Under the "messaging endpoint" section, see the full path. I suspect you only have the https://[something].ngrok.io part and not the /api/messages part.

    You can see this because in your ngrok log that you've posted, the path is direct to the root (/), not to /api/messages or similar.