Inline video upload giving 401

Luciano Domínguez 10 Reputation points
2024-05-13T12:34:55.02+00:00

Hi all!
So I'm developing a bot using bot framework and C#. I have successfully implemented upload for attached files and inline images as done in the bot-file-upload teams example. Up until then, everything working perfectly, even getting the bearer token from bot framework to get the inline images. The issue comes when trying to get an inline video. In this case, I don't get the ContentType for video but instead a 'text/html' ContentType and some html in the Content:

<p><img alt="Media" itemscope="" itemtype="http://schema.skype.com/AMSImage" src="https://eu-api.asm.skype.com/v1/objects/xxxxxxxxxxxxxxxxx/views/imgo" width="1330" height="1767"></p>

<p>

<video src="https://eu-api.asm.skype.com/v1/objects/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/views/video" itemscope="" itemtype="http://schema.skype.com/AMSVideo" width="256" height="144" data-duration="PT10S" alt="Media">

</video> </p>
(The video id was changed for privacy reasons)

So in my code I get the url from the video src="" and do a GET call with the same bearer token I use for images but get a 401. Also tried without this token just to continue getting the same 'forbidden' error code.

Is there a different approach I should follow? Has anyone else encountered this same issue?

Thank you!

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.