Public versus Private videos avatar
Written by
Updated over a week ago gives you the ability to control whether the video you public can be consumed by anyone (like Youtube, Vimeo and etc.) or be a private video that can have restricted access for one or specific users (like Netflix, Hulu, Udemy and etc.)

Videos on can be tagged public or private.

When you create a video, you can control if the video is private or public. By default, all videos that are created have the public attribute set to “true.” This means that anyone with the video url can watch the video. If you’d like to make your videos private, simply toggle public to false, and each video will be served with a unique token good for one viewing.

Public videos at have the format:

The value after VOD is the videoId. Anyone with this link can watch this video.

What if we set the video to private? Well, first off, the URL format looks different:

This video can be watched by exactly one user. Once it is viewed, the token is invalid, and the link will throw a 404 error (and the player will say “video not available.” This token is valid for the browser window session.

The second part of this is that the user must re-authenticate to watch again. You can use the analytics to determine if the user has watched the video. Use our dynamic metadata 3 to tag the session with your user’s ID.

When you authenticate the user - you can check “has userX watched this video?” If no results come back - then you can obtain the private video URL. If results come back - then your business logic can decide if they watched enough to block them for a 2nd view.

Many users use private videos in their applications with great success.

You can find the documentation for Private Videos in our docs:

You can check out this great tutorial on how to handle private videos:

Did this answer your question?