0

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)

vladdy
  • 1
  • Behind the scenes, when you create a bot it creates an entry in the Bot Framework services. I'm not sure offhand how Teams Toolkit does it, but it might appear in your Azure subscription. If it does, there is a setting there to control the final location for where the bot is hosted. – Hilton Giesenow Sep 15 '22 at 16:06
  • Thank you for your response, but my goal is to have many locations for the bot to be hosted as it it be deployed to different clients that will make request to a specific https url that is accessible only to them. Where can i find this entry in th Bot Framwork services? – vladdy Sep 15 '22 at 16:37
  • If you're hosting it in Teams, the client never actually sees any traffic or locations, so having a unique URL for each client won't get you anything at all. Instead, what might be more sense is to check which client is sending which message - every message your bot receives contains the tenant Id of the tenant that sent it, as well as the user id and other relevant identifiers. – Hilton Giesenow Sep 15 '22 at 16:45

1 Answers1

0

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.
Kuojian Lu
  • 66
  • 1