Tommo56700
Tommo56700

Reputation: 15

Teams Toolkit: Bot not receiving messages from Teams

I have followed the basic instructions to create a new command bot using the Teams Toolkit in .NET. However, interacting with this by sending messages through MS Teams, I am not receiving any requests to my /api/messages endpoint or my ngrok endpoint.

  1. Download and install ngrok (https://ngrok.com/)
  2. Open a command prompt and run ngrok http 5130
  3. Right-click your project and select Teams Toolkit > Prepare Teams App Dependencies
  4. If prompted, sign in with a Microsoft 365 account for the Teams organization you want to install the app to
  5. Press F5, or select the Debug > Start Debugging menu in Visual Studio
  6. In the launched browser, select the Add button to load the app in Teams
  7. In the chat bar, type and send "helloWorld" to your app to trigger a response

No request is seen.

I have tried testing this from https://dev.botframework.com where I can login and test my bot. I do receive requests from there. So, the issue seems isolated to Teams. No errors in the network tab of dev tools on teams (chrome).

How can I debug this further, is it possible to trace a message through to the azure bot service and onwards?

Upvotes: 1

Views: 426

Answers (1)

Tian Yuan
Tian Yuan

Reputation: 46

Could you please try opening a browser and navigating to 'your-ngrok-url/api/messages' to see what content is displayed? If you encounter a page that shows a ngrok_6022 error like this, you can follow the guidelines on that page to add an authentication token and restart ngrok. After doing so, you can prepare the Teams app again and proceed with debugging. Alternatively, you can start ngrok using the command 'ngrok http 5130 --log=stdout --log-format=logfmt --authtoken (your-auth-token)' and then prepare the Teams app and resume debugging.

enter image description here

Upvotes: 0

Related Questions