What is the best way to get a private video's playback token?

Hello,

what is the best way to retrieve the playback tokens of private videos?

I currently fetch them by GETting https://ws.api.video/videos/{videoId} and splitting the player URI on = like so

token = response.assets.player.split('=')[1]

This works but feels a bit hacky… is there a more robust/elegant way to do it?

It may be nice to send the token in /videos/{videoId} response if public = false.

Hi Simeon,

Indeed, for now that’s the only way to retrieve the token value.

We plan to create a dedicated endpoint to generate these tokens but we can’t give you any ETA for now.

Regards,

Olivier

1 Like