Madhvi Mittal
Madhvi Mittal

Reputation: 67

Link to message posted by Bot in MSTeams

How can I get the link( which I got on clicking the 3 dots of a message) of all messages posted to the channel by my bot? After getting this link, I want to DM the link to the user through the bot.

enter image description here

Upvotes: 0

Views: 223

Answers (1)

Trinetra-MSFT
Trinetra-MSFT

Reputation: 1015

You can take a look at list channel messages API. This will give you the message_id and channel _id later you can try to deep link https://teams.microsoft.com/l/message/{channel_id}/{message_id} to same message using message id or channel. There is also alternate solution for this, subscribe to channel using change notification API. You will be getting all the messages of channel to notification endpoint, you can Deserialize the message payload you will find the copy link url in the payload it self.

Upvotes: 1

Related Questions