I’ll tell you in advance, I use: api.botframework
https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token
To get up-to-date tokens, etc.
And I can easily receive attached files as there is downloadUrl where tokens are not needed, here is an example of such:
"attachments": [
{
"contentType": "application/vnd.microsoft.teams.file.download.info",
"content": {
"downloadUrl": "https://ss-my.sharepoint.com/personal/vivliiev_mobilecoach_onmicrosoft_com/_layouts/15/download.aspx?UniqueId=15-long-token-PMhX6PELii6tA&ApiVersion=2.0",
"uniqueId": "15e14627-cd76-4a43-b4df-1bd0332e4e49",
"fileType": "mp4"
},
"contentUrl": "https://ss-my.sharepoint.com/personal/vivliiev_ss_onmicrosoft_com/Documents/Files of Chats Microsoft Teams/video (1).mp4",
"name": "video (1).mp4"
}
],
And this is what I get when they send me a video clip:
"attachments": [
{
"contentType": "text/html",
"content": "<div><video src="https://us-api.asm.skype.com/v1/objects/0-eus-d19-c4a3116073700863bebc6a69d91e0dd6/views/video" itemscope="" itemtype="http://schema.skype.com/AMSVideo" data-duration="PT3.617S" width="1280" height="720">rnVideo-Clip</video></div>"
}
],
Even after receiving the link, I can’t download it because I need authorization in ms-team for this and the keys for azure bot are not suitable for this purpose. In general it is normal to send content to the bot, which except for ms-tam itself no one can download. It is also impossible to get content from contentUrl.
I tried to get the content from the link: https://us-api.asm.skype.com/v1/objects/0-eus-d19-c4a3116073700863bebc6a69d91e0dd6/views/video
but could not achieve this, those keys that are used for botframework are not enough to get such content.