Forum Discussion
Pierre_Z92
Sep 08, 2022Copper Contributor
Teams message update event & bot framework sdk
Hello, I'm currently working on a teams bot to interact with users using the Bot Framework SDK and node.js. I have already set up an endpoint (Teams activity handler) to receive incoming mess...
- Sep 23, 2022Please go through the https://learn.microsoft.com/en-us/graph/teams-changenotifications-chat, https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http documents. Change notifications for chats enable you to subscribe to changes (create and update) to chats.
Pierre_Z92
Sep 21, 2022Copper Contributor
Meghana-MSFTThanks for you reply. What is the preferred way of getting update notifications ?
Meghana-MSFT
Microsoft
Sep 23, 2022Please go through the https://learn.microsoft.com/en-us/graph/teams-changenotifications-chat, https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http documents. Change notifications for chats enable you to subscribe to changes (create and update) to chats.
- Pierre_Z92Oct 07, 2022Copper ContributorMeghana-MSFT Following your suggestion, I tried to create & manage subscriptions about chat updates with Graph API.
When a update is triggered, my endpoint receives the id of the chatMessage that has been updated.
In order to retrieve the content of the updated message, I am using the Graph API with :
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}
I found out that this endpoint can be used to access any chatMessage in Teams, not only those which belong to chats between my bot and users. I'm concerned about the safety of this practice.
Is there any other way of retrieving a message between my bot and users ?- Meghana-MSFTNov 02, 2022
Microsoft
Apologies for the delay, it is the only way to subscribe to changes in chats.