Could not get media by id

Hello,

we are trying to get media file to our backend from the Session.

We are using Integration API Reference - Skylight Docs

We have got the media list successfully

{
“data”: [
{…
“applicationId”: “60017f8a80d985231a2af513”,
“sessionId”: “e8d69057-f549-410e-be67-813ea88f528d”,
“labels”: [],
“filename”: “d97ea7df-ac2d-46d3-8ac9-181dcd540b30.jpg”,
“contentType”: “image/jpeg”,
“totalBytes”: 261191,
“mediaId”: “d97ea7df-ac2d-46d3-8ac9-181dcd540b30”,
“modifiedAt”: “2021-02-18T11:42:40.673Z”,
“modifiedBy”: “999b3fce-ea53-43e4-ae15-579c9f9a16e1”,
“createdAt”: “2021-02-18T11:42:39.614Z”,
“createdBy”: “999b3fce-ea53-43e4-ae15-579c9f9a16e1”,
“etag”: “W/l8D+j8YVyxHrRRWOgoPzc9Ji9r4=”,
“uploadedBytes”: 261191,
“properties”: {
“tag”: “4696586”,
“capturedAt”: “2021-02-18T11:42:37.835Z”
}
}
],
“page”: {
“count”: 2,
“limit”: 50,
“total”: 2,
“prevCursor”: null,
“nextCursor”: null
}

But this request returs error -Not Found.

https://api.skylight.upskill.io/v1/application/applications/60017f8a80d985231a2af513/sessions/e8d69057-f549-410e-be67-813ea88f528d/media/d97ea7df-ac2d-46d3-8ac9-181dcd540b30/content

What is wrong?

And another question. Is it possible to get media from SDK?

Thank you,
Michael

Hi Michael!

Looking at that URL, it looks like it should work – I would check to make sure that the account making the query has the proper roles within the application (I believe they should have the session:read permission for all sessions or session:read as a participant and be a participant of that session).

It looks like the SDK has the following method to support downloading of session media content:

    public async Task<byte[]> DownloadSessionMedia(string applicationId, string sessionId, string mediaId)

Cheers,

~Andrew