简体   繁体   中英

Sending Proactive Messages on Microsoft Teams with Bot framework

I installed a chatbot on Teams built with a bot framework. I am using Azure DevOps to update changes to the bot.

I want to send proactive messages to users following this Microsoft documentation and example code . But I don't know how to call the /api/notify endpoint.

How can I call the https://xxxxxx.azurewebsites.net/api/notify from within my code to send proactive messages to users on Teams?

One thing I don't like about this sample is that it makes it seem like you need to host the -ability- to make a pro-active call inside the same web host as your bot itself, which is definitely not required. You could, for instance, have your bot hosted in web application, but make a pro-active call from an Azure Function directly. That's one of the reasons I put together a different sample - check it out here . It requires only a service url (because the endpoint can change based on the tenant's geography, for instance) and a "conversation id" so that it know which user/group/channel to message to. Please check it out and see if it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM