Replace Image files with bot using API in MS Teams chat
Hi Everyone,
We are developing an MS Teams bot where we have a use case to replace an Image file with another Image file. We have implemented the scenario using the SharePoint APIs. But there is an issue with it. If we download the file from the SharePoint list of files, we get the replaced file but if we try to download the file from Teams Chat Preview, we can still download the original file, not the replaced one.
I have looked over the network logs, the image file is getting saved in two different endpoints (SharePoint and asyncgw.teams.microsoft.com) and asyncgw.teams.microsoft.com is used for previewing and downloading the file from the teams chat.
Is there any way we can point the download URL in MS Teams image preview to the SharePoint image URL or can we replace the file in asyncgw.teams.microsoft.com with some API call?
Thanks!