I'm working on a plugin that integrates with Microsoft Teams. I'd like to post messages to channels. I have created a simple Python script that uses REST API to do that. It goes through the following steps:
This example works. There is just one problem: the value of serviceUrl (https://smba.trafficmanager.net/emea). It has been obtained by me from a previous message sent to my bot. From what I've learned from the documentation (https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/apps/apps-overview) the value can change at any time and it's better to update it each time the bot receives a message. However, it's possible that my bot will not receive regular messages or any messages at all (it will only be used for sending messages). In that case how can I make sure that the value of serviceUrl is up to date? Is there an endpoint I can call to receive the current version of serviceUrl? Shall I use connectors instead of bots for this case?