How to embed a private video via Dailymotion’s API?

To embed a private video, you have to use a “kid” instead of a “xid”. Once you’ve retrieved it, there are 3 ways to embed your video via our API: using the “private_id” field, the “embed_html” field or the “embed_url” field. Here’s how.

Get your video “kid”

Here is an API call example which can be done when you’re logged in and owner of the video:,embed_html,embed_url. This will provide your video “kid”, essential step in embedding a private video.

 "private_id": "k1A2b3c4d5C6d7E8f9g",
 "embed_html": "<iframe frameborder=\"0\" width=\"480\" height=\"270\" src=\"\" allowfullscreen allow=\"autoplay\"></iframe>",
 "embed_url": ""

The “private_id” field

The first way to embed a private video is by using the “private_id” field (you have to be the owner of the video to use this field). Note that successive calls will generate different ids. 


If you disclose your video “kid”, it won’t be private anymore.

The “embed_html” field

Another way to embed a private video is to use the “embed_html” field. It will send you the html code that you’ll use to embed the video and it should adapt properly to the correct id (whether it’s an “xid” or a “kid”).

<iframe frameborder="0" width="480" height="270" src="" allowfullscreen allow="autoplay"></iframe>

The “embed_url” field

Finally, you can embed your private video by using the “embed_url” field. It will provide you the URL to embed the video via our API.