Forum Discussion
Thomsch
Sep 27, 2022Iron Contributor
Teams Export API - Inline images in chat or channel conversations
We are in the middle of building our own chat/channelconversation backup tool for our company via the Teams Export API which works perfectly.
A lot of inline pasted images are being used in our company. Is it possible to get these images out as well?
The inline image is part of the body, but I'm not sure if/how it can be received...
"body": {
"contentType": "html",
"content": "<p><img src=\"https://graph.microsoft.com/v1.0/chats/CHATID/messages/MESSAGEID/hostedContents/aWQ9eF8wLXdldS1kMjEtMDI3NGRiZDQ2MTljMjA2ZTY2MjQ3ZDI2ZGY5ZmIwNzEsdHlwZT0xLHVybD1odHRwczovL2V1LWFwaS5hc20uc2t5cGUuY29tL3YxL29iamVjdHMvMC13ZXUtZDIxLTAyNzRkYmQ0NjE5YzIwNmU2NjI0N2QyNmRmOWZiMDcxL3ZpZXdzL2ltZ28=/$value\" alt=\"image\" width=\"343\" height=\"201\" itemid=\"0-weu-d21-0274dbd4619c206e66247d26df9fb071\" style=\"vertical-align:bottom\">Text nach dem Bild</p>"
}
- I just figured it out. With another GET query and the respective token I'm able to receive the image itself.
4 Replies
Sort By
- ThomschIron ContributorI just figured it out. With another GET query and the respective token I'm able to receive the image itself.
- SatsumaSegmentCopper Contributor
Hi there, I know this was a while ago but could you tell me what token endpoint you needed to use here please?
I presume you were having the same issue as me, trying to use the bot to download the image via the contentUrl?
I am able to do this with attached files easily but when the user pastes a file into the chat it needs to be handled differently and I'm still trying to figure out how. - Meghana-MSFT
Microsoft
Thank you for confirming.
- Meghana-MSFT
Microsoft
we are looking into this issue, we will get back to you.