Teams communication to custom https endoint

Viewed 37

I would like to know how does Team communicate with a custom https endpoint.

I am developping a bot using Teams Toolkit and I am trying to understand what commands does teamsfx in order to successfuly side load app on Teams.

When trying to run the default command of "dev:teamsfx" and building the package using the correct ngrok enpoint and then uploading that package on Teams, the bot does not receive any messages through the "api/messages" endpoint.

However, when i run the deugging tool in VS Code, everything works fine and we pin pointed that the part that we are missing to add is found inside of these commands : Teams Toolkit executed commands

So i have 2 questions :

Where can i find documentation regarding the tasks that Teams Toolkit is running so that we can manually execute those commands?

Why does Teams not reach our "api/messages" endpoint when we ONLY run "dev:teamsfx" ? (The appPackage is correct with the right manifest)

1 Answers

To answer your two questions:

  1. The documentation about using Teams Toolkit to debug you app is here. You can read the documentation to know the details about what Teams Toolkit does for you after you press F5. For bot, Teams Toolkit will register and configure the bot, see here for more details.
  2. When you run dev:teamsfx, the bot service will start. However, you have not configured the bot messaging endpoint, this is why Teams does not reach api/messages. When you press F5, Teams Toolkit will automatically start ngrok to forward the local bot traffic to a public url, then use this url to configure the bot messaging endpoint, e.g. https://0556-2404-f801-9000-1a-6fea-00-690.ngrok.io/api/messages. If you want to use your own tunnelling tool instead of the default ngrok, you can follow this doc. By the way, you can manage the bot (that Teams Toolkit has created for you) in Bot Framework developer portal, https://dev.botframework.com/bots.
Related