User¶
An individual user represented in the Graph API.
Test this object with the API Explorer
To read a user, perform an HTTP GET request on https://api.dailymotion.com/user/USER_ID. By default, only a small number of fields are returned. To request specific fields, pass the list of wanted fields in the fields query-string parameter (ex: https://api.dailymotion.com/user/USER_ID?fields=field1,field2,...).
Global API Parameters¶
The following parameters are valid globally on the API:
- localization – Change the default localization of the user. This will affect results language and content selection.
Note that changing the localization won’t give access to geoblocked content of the defined localization. The IP of the API consumer is always used for this kind of restriction. You can use a standard locale like fr_FR, en_US or simply en, it.
- family_filter – Enable/disable the family filter. By default, the family filter is on. Changing this parameter will filter-out
explit content from searches and global contexts. You should always check the explicit field when applicable as some contexts may return those contents. You should then flag those content in your UI to warn the user about the nature of the content.
- ssl_assets – Get secured https urls for assets. By default, this option is turned off. Changing this parameter value to true
will provides https urls for video/thumbnail_*_url, video/embed_html, video/embed_url, video/swf_url, user/avatar_*_url
Fields¶
| Name | Description | Permissions | Format |
|---|---|---|---|
| address | The address of the user | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| avatar_large_url | The URL to the user’s avatar (160px by 160px). | No access_token required for reading. | Returns url. |
| avatar_medium_url | The URL to the user’s avatar (80px by 80px). | No access_token required for reading. | Returns url. |
| avatar_small_url | The URL to the user’s avatar (40px by 40px). | No access_token required for reading. | Returns url. |
| background_url | The URL to the user’s background (Max 1680px by 2000px). | No access_token required for reading. | Returns url. |
| banner_url | The URL to the user’s banner (Max 970px by 120px). | No access_token required for reading. | Returns url. |
| birthday | The user’s birthday | userinfo scope required for reading. userinfo scope required for writing. | Returns date. |
| city | The city of the user | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| country | The country of the user | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| created_time | The date when the user joined the site | No access_token required for reading. | Returns date. |
| description | The user’s description | No access_token required for reading. This field is writable. | Returns string, min size: 1, max size: 2000. |
| The user’s email address | email scope required for reading. | Returns email. | |
| filters | A list of filters availbe to reduce the result set. | This field can be used as filter but can’t be read nor written. | Returns array, allowed values: featured, official, creative. |
| first_name | User’s first name | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| fullname | The user’s fullname | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 50. |
| gender | The user’s gender: female or male | No access_token required for reading. This field is writable. | Returns string, allowed values: male, female. |
| id | The user object ID | No access_token required for reading. | Returns the object id. |
| language | The user’s language | This field can be used as filter. No access_token required for reading. This field is writable. | Returns string, min size: 1, max size: 150. |
| last_name | User’s last name | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| mini_banner_url | The URL to the user’s mini banner (Max 215px by 30px). | No access_token required for reading. | Returns string, min size: 1, max size: 150. |
| phone | The phone number of the user | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| post_code | The zip of the user | userinfo scope required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 150. |
| screenname | The user’s fullname of username depending on user’s preference | No access_token required for reading. userinfo scope required for writing. | Returns string, min size: 1, max size: 50. |
| search | Full text search | This field can be used as filter but can’t be read nor written. | Returns string, min size: 1, max size: 150. |
| sort | Change result ordering | This field can be used as filter but can’t be read nor written. | Returns string, allowed values: recent, relevance, popular, commented, rated, alpha. |
| status | The user account status | No access_token required for reading. | Returns string, allowed values: pending-activation, disabled, active, unknown. |
| type | The user type | No access_token required for reading. | Returns string, allowed values: ugc, motionmaker, official. |
| url | The URL of the user on Dailymotion. | No access_token required for reading. | Returns url. |
| username | The user’s username | No access_token required for reading. | Returns string, min size: 1, max size: 25. |
| videos_total | The total number of user’s public videos | No access_token required for reading. | Returns number, min value: 0. |
| videostar | Change the user’s video star | No access_token required for reading. manage_videos scope required for writing. | Return a video. You can request sub-fields by using videostar.<sub-field> notation. |
| views_total | The total aggregated number of views on all user’s videos | No access_token required for reading. | Returns number, min value: 0. |
Connections¶
| Name | Description | Permissions | Returns |
|---|---|---|---|
| activities | The user’s activities | No access_token required for reading. | A list of Activity. |
| contests | Contests this user is member of | No access_token required for reading. | A list of Contest. |
| fans | The user’s fans. | No access_token required for reading. | A list of User. |
| favorites | The user’s favorited videos. | No access_token required for reading. manage_favorites scope required for writing. | A list of Video. |
| features | The videos featured by the user | No access_token required for reading. manage_features scope required for writing. | A list of Video. |
| feed | The user’s feed | feed scope required for reading. | A list of Activity. |
| following | The users this user is subscribed to | No access_token required for reading. manage_subscriptions scope required for writing. | A list of User. |
| friends | The user’s friends | No access_token required for reading. manage_friends scope required for writing. | A list of User. |
| groups | The user’s created groups | No access_token required for reading. manage_groups scope required for writing. | A list of Group. |
| offers | The users a user has paid to have access to. | No access_token required for reading. internal role required for writing. | A list of User. |
| playlists | The user’s playlists | No access_token required for reading. This connection is writable. | A list of Playlist. |
| subscriptions | The videos comming from user’s subscriptions. | No access_token required for reading. | A list of Video. |
| videos | The user’s uploaded video | No access_token required for reading. manage_videos scope required for writing. | A list of Video. |
The activities connection¶
Read¶
You can read the list of a user‘s activities by issuing an HTTP GET to /user/USER_ID/activities. You can requests the list of activity‘s fields to be returned using the fields parameter.
Test with the API Explorer
The contests connection¶
Read¶
You can read the list of a user‘s contests by issuing an HTTP GET to /user/USER_ID/contests. You can requests the list of contest‘s fields to be returned using the fields parameter.
Test with the API Explorer
The fans connection¶
Read¶
You can read the list of a user‘s fans by issuing an HTTP GET to /user/USER_ID/fans. You can requests the list of user‘s fields to be returned using the fields parameter.
Test with the API Explorer
The favorites connection¶
Read¶
You can read the list of a user‘s favorites by issuing an HTTP GET to /user/USER_ID/favorites. You can requests the list of video‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a user has a favorite by issuing an HTTP GET to /user/USER_ID/favorites/VIDEO_ID. This will return a list containing only the video if connected or an empty list otherwise.
Create¶
You can add a favorite by issuing an HTTP POST request to /user/USER_ID/favorites/VIDEO_ID.
Test with the API Explorer
Delete¶
You can remove a favorite by issuing an HTTP DELETE request to /user/USER_ID/favorites/VIDEO_ID.
Test with the API Explorer
The features connection¶
Read¶
You can read the list of a user‘s features by issuing an HTTP GET to /user/USER_ID/features. You can requests the list of video‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a user has a feature by issuing an HTTP GET to /user/USER_ID/features/VIDEO_ID. This will return a list containing only the video if connected or an empty list otherwise.
Create¶
You can add a feature by issuing an HTTP POST request to /user/USER_ID/features/VIDEO_ID.
Test with the API Explorer
Delete¶
You can remove a feature by issuing an HTTP DELETE request to /user/USER_ID/features/VIDEO_ID.
Test with the API Explorer
The feed connection¶
Read¶
You can read the list of a user‘s feed by issuing an HTTP GET to /user/USER_ID/feed. You can requests the list of activity‘s fields to be returned using the fields parameter.
Test with the API Explorer
The following connection¶
Read¶
You can read the list of a user‘s following by issuing an HTTP GET to /user/USER_ID/following. You can requests the list of user‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a user has a following by issuing an HTTP GET to /user/USER_ID/following/USER_ID. This will return a list containing only the user if connected or an empty list otherwise.
Create¶
You can add a following by issuing an HTTP POST request to /user/USER_ID/following/USER_ID.
Test with the API Explorer
Delete¶
You can remove a following by issuing an HTTP DELETE request to /user/USER_ID/following/USER_ID.
Test with the API Explorer
The friends connection¶
Read¶
You can read the list of a user‘s friends by issuing an HTTP GET to /user/USER_ID/friends. You can requests the list of user‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a user has a friend by issuing an HTTP GET to /user/USER_ID/friends/USER_ID. This will return a list containing only the user if connected or an empty list otherwise.
Create¶
You can add a friend by issuing an HTTP POST request to /user/USER_ID/friends/USER_ID.
Test with the API Explorer
Delete¶
You can remove a friend by issuing an HTTP DELETE request to /user/USER_ID/friends/USER_ID.
Test with the API Explorer
The groups connection¶
Read¶
You can read the list of a user‘s groups by issuing an HTTP GET to /user/USER_ID/groups. You can requests the list of group‘s fields to be returned using the fields parameter.
Test with the API Explorer
Create¶
You can create a group by issuing an HTTP POST request to /user/USER_ID/groups with the following parameters. You will get in return a dict containing the newly created object id.
| Parameter | Description | Type | Required |
|---|---|---|---|
| name | The Group’s name | string | Yes |
| url_name | The globally unique group name to be used in URL (only alphanum + “-” and “_” letters are allowed) | string | Yes |
| description | The group’s description | string | No |
Test with the API Explorer
Delete¶
You can delete a group by issuing an HTTP DELETE request to /group/GROUP_ID.
Test with the API Explorer
The offers connection¶
Read¶
You can read the list of a user‘s offers by issuing an HTTP GET to /user/USER_ID/offers. You can requests the list of user‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a user has a offer by issuing an HTTP GET to /user/USER_ID/offers/USER_ID. This will return a list containing only the user if connected or an empty list otherwise.
Create¶
You can add a offer by issuing an HTTP POST request to /user/USER_ID/offers/USER_ID.
Test with the API Explorer
Delete¶
You can remove a offer by issuing an HTTP DELETE request to /user/USER_ID/offers/USER_ID.
Test with the API Explorer
The playlists connection¶
Read¶
You can read the list of a user‘s playlists by issuing an HTTP GET to /user/USER_ID/playlists. You can requests the list of playlist‘s fields to be returned using the fields parameter.
Test with the API Explorer
Create¶
You can create a playlist by issuing an HTTP POST request to /user/USER_ID/playlists with the following parameters. You will get in return a dict containing the newly created object id.
| Parameter | Description | Type | Required |
|---|---|---|---|
| name | The playlist’s name | string | Yes |
| description | The playlist’s description | string | No |
Test with the API Explorer
Delete¶
You can delete a playlist by issuing an HTTP DELETE request to /playlist/PLAYLIST_ID.
Test with the API Explorer
The subscriptions connection¶
Read¶
You can read the list of a user‘s subscriptions by issuing an HTTP GET to /user/USER_ID/subscriptions. You can requests the list of video‘s fields to be returned using the fields parameter.
Test with the API Explorer
The videos connection¶
Read¶
You can read the list of a user‘s videos by issuing an HTTP GET to /user/USER_ID/videos. You can requests the list of video‘s fields to be returned using the fields parameter.
Test with the API Explorer
Create¶
You can create a video by issuing an HTTP POST request to /user/USER_ID/videos with the following parameters. You will get in return a dict containing the newly created object id.
| Parameter | Description | Type | Required |
|---|---|---|---|
| title | The title of the video. | string | No |
| tags | The list of tags for the video. | array | No |
| channel | The short channel name of the video. | object | No |
| description | The description of the video. | string | No |
| language | The language of the video (declarative). | string | No |
| country | The country of the video (declarative, may be null). | string | No |
| url | The URL of the video on Dailymotion site. Writing this parameter defines where to download the video source. You may either use this parameter at video creation time or change this parameter later if you want to change the source video afterward. To change an existing video, the authenticated user may need some additional rights like motionmaker right. When replacing an existing source, the video will put offline for some minute during the re-encoding. You may use the GET /file/upload API ressource to upload a video file and create a URL to provide to this method or use an existing URL pointing to a video file. Writing to this parameter is subject to rate limiting. | url | No |
| taken_time | The date the video was taken (declarative). | date | No |
| type | The content type of the video (can be official, creative or null). | string | No |
| official | A shortcut to set video as official | boolean | No |
| creative | A shortcut to set video as creative | boolean | No |
| mode | The stream mode, can be vod, simulcast or live. | string | No |
| start_time | The started time of the stream | date | No |
| end_time | the end date of the stream | date | No |
| private | True if the video is private. | boolean | No |
| published | True if the video is published (may still wait for encoding, see status field for more info). | boolean | No |
| allow_comments | If true, allows comments to be posted on this video. | boolean | No |
| owner | The id of the owner of the video (use owner.screenname to show the user name). | object | No |
| thumbnail_url | The URL of the video raw thumbnail (full size respecting ratio). Some users have the right to change this value by providing an URL to a custom thumbnail. To extract the preview from a live stream, use extract://live | url | No |
| thumbnail_auto_refresh | Toggle the automatic refresh of the thumbnail for the given live video. | boolean | No |
| publish_date | A date after which the video will be made available. Use a past date before Jan 1st 1990 to reset this parameter. | date | No |
| expiry_date | A date after which the video will be unpublished. Use a future date after Jan 1st 2100 to reset this parameter. | date | No |
| mediablocking | The list of blocking rules per country and device to be applied on the video. Each rule has the following format : country/[country code]/media/[media id] Available country codes are : ar, at, br, ca, ch, cn, de, dk, es, fr, gb, gr, ie, in, it, js, jp, kr, mx, nl, pl, pr, pt, ro, ru, se, tr, us, other. Available medias id are : iptv, mobile, tvhz, web, other. | array | No |
| geoloc | Geolocalization for the video. Result is an array with the longitude and latitude using point notation. Longitude range is from -180.0 (West) to 180.0 (East). Latitude range is from -90.0 (South) to 90.0 (North). | array | No |
| geoblocking | A list of countries where the video is or isn’t accessible. The list of countries start with the “deny” or “allow” keyword to define if this is a black or a whitelist. Examples: [“fr”, “us”, “it”] or [“allow”, “fr”, “us”, “it”] will both allow the video to be accessed in France, US and Italy and deny all other countries. [“deny”, “us”] will deny the access to the video from the US and allow it everywhere else. An empty list or [“allow”] (the default) will allow it from everywhere. | array | No |
| block_countries | A list of countries where the video must not be accessible. Use an empty list to reset this parameter. This parameter is superseded by allow_countries if present. | array | No |
| allow_countries | A list of countries where the video is accessible, all other countries will be blocked. Use an empty list to reset this parameter. This parameter supersedes the block_countries parameter. | array | No |
| 3d | A boolean indicating that the video is in 3D format (true) or not (false). | boolean | No |
| adfit | Is advertising allowed on a video depending on its content | boolean | No |
Test with the API Explorer
Delete¶
You can delete a video by issuing an HTTP DELETE request to /video/VIDEO_ID.
Test with the API Explorer