Table of content

Embed private content on your properties


You can use the Dailymotion Platform API to easily collect the content IDs in order to embed your content on your properties.

In this article, you’ll learn the different privacy settings available in our Platform API, and how to easily collect the right content ID for the embed.


Understand the content privacy

Depending on the privacy set on the content, the embed code will require a specific content id:

  • Public or password protected content – You must use the id field to embed your content
  • Private content – You must use the private_id field to embed your content

If you want to get more information about the content privacy options, please read our video privacy guide.

Collect private_id:

 

When a content privacy is set on private, the private_id isn’t accessible publicly and only organization members will be able to collect it.

To access this field, you must be authentificated through the API.

Please read our API authentication guide to learn more.

Collect the content id

We suggest you to always request the following fields when you’re generating IDs for your content to make sure you always have all the necessary information no matter the embed method used (direct integration, CMS…):

  • title – allows you to easily identify the content you would like to migrate
  • id – the unique content identifier.
  • private_id – the id allowing a user to access to a private content (Set to null if the content is public).

Code samples

### List video ids from a specific user 

https://api.dailymotion.com/user/USERNAME/videos?fields=title,id,private_id
### List video ids from a specific playlist

https://api.dailymotion.com/playlist/x7q1er/videos?fields=title,id,private_id
### List all the IDs from a specific video

https://api.dailymotion.com/video/x84sh87?fields=title,id,private_id

Response example

{
"title": "CEO interview",
"id": "x123456",
"private_id": "k12345654321",
"private": true,
},

{
"title": "Christmas hackathon",
"id": "x1y2z3b",
"private_id": null,
"private": false,
},

Embed your content

You should have all the necessary elements to proceed with the integration.

We invite you to continue with our dedicated integration method guides to learn how to pick the best integration method and start your step-by-step integration.