It can happen that an API request returns an error. In this article, we'll show you how a response with an error looks like, and the meaning of the most common errors received so you can troubleshoot them easily.
You are reading API v2 documentationStill using the Legacy API? Access the Legacy API documentation.
All API v2 error responses return a JSON that follows the same standard format:
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Video with ID 'x1' not found.",
"correlation_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"object_id": "x1",
"reason": "object_not_found",
"object_type": "Video",
"param": "id"
},
"documentation_url": "https://developers.dailymotion.com/reference/api-errors"
}
}| Field | Description |
|---|---|
code | Stable machine-readable error code (ie. RESOURCE_NOT_FOUND, MISSING_PERMISSIONS). |
message | Human-readable error description intended for developers. |
correlation_id | Request correlation ID to share with Support Team when troubleshooting. May be null. |
details | Structured additional context. The shape of this object depends on the code value. |
documentation_url | Link to this API error reference page. |
Possible reasons:
No Authorization: Bearer header, malformed JWT, expired token, or invalid signature. Identity is not established ( unlike error 403), the caller is not treated as an authenticated subject.
HTTP status codes & error codes
| Code | Meaning | Usage |
|---|---|---|
200 OK | Success | Successful GET or PATCH |
201 Created | Resource created | Successful POST |
204 No Content | No body | Successful DELETE |
500 Internal Server Error | Unexpected error | Unhandled server error |
401 - Authentication failed
Possible reasons: No Authorization: Bearer header, malformed JWT, expired token, or invalid signature. Identity is not established ( unlike error 403), the caller is not treated as an authenticated subject.
Typicalerror.code values: INVALID_AUTHORIZATION, AUTHORIZATION_EXPIRED
Example:
{
"error": {
"code": "AUTHORIZATION_EXPIRED",
"message": "Authorization expired.",
"correlation_id": "550e8400-e29b-41d4-a716-446655440000",
"details": { "param": "authorization" },
"documentation_url": "https://developers.dailymotion.com/reference/api-errors"
}
}403 - Authorization failed
The bearer token was accepted, but the caller lacks the required OAuth scopes or permissions, or an upstream service denied access to the resource.
Typicalerror.code values: MISSING_PERMISSIONS, UPSTREAM_ACCESS_DENIED
Example:
{
"error": {
"code": "MISSING_PERMISSIONS",
"message": "Missing required permissions: playlist:write. Required: playlist:read, playlist:write.",
"correlation_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"required_permissions": ["playlist:read", "playlist:write"],
"missing_permissions": ["playlist:write"]
},
"documentation_url": "https://developers.dailymotion.com/reference/api-errors"
}
}404 - Resource not found
Possible reasons: The path ID does not exist, a parent resource in a nested URL is missing, or the object is not visible.
Typicalerror.code value: RESOURCE_NOT_FOUND
Example:
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Video with ID 'x1' not found.",
"correlation_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"object_id": "x1",
"reason": "object_not_found",
"object_type": "Video",
"param": "id"
},
"documentation_url": "https://developers.dailymotion.com/reference/api-errors"
}
}422 - Unprocessable entity
Possible reasons:
- Invalid path, query, or body parameters
- Domain validation errors
- Missing context (ie. a required parent ID or value is absent)
Typicalerror.code values: MISSING_PARENT_ID, MISSING_REQUIRED_VALUE
Best Practices
- Always check the
codefield: The HTTP status code tells you the category, butcodegives you the precise error for programmatic handling. - Share
correlation_idwith Support: Include it when contacting Dailymotion Support to help trace your request. - Read the
detailsobject: Provides structured context (ie. which permissions are missing, which parameter is invalid) to help you fix the request without guessing. - Refresh tokens proactively:
AUTHORIZATION_EXPIREDmeans that your access token has expired. Implement token refresh logic to avoid interruptions.
Video access errors
When requesting access to a video, the API may return a message in the access_error field explaining why the access can't be granted. Here are the different access error codes you may encounter:
| Error codes | Error description |
|---|---|
DM001 | No video has been specified, you need to specify one. Displays: No video available Sorry, this content is no longer available |
DM002 | Content has been deleted. Displays: Video has been deleted This video is no longer available |
DM003 | Live content has ended, it is not available. Displays: Live stream offair |
DM005 | Content rejected: This video may have been removed due to a breach of the terms of use, a copyright claim or an infringement upon third party rights. Displays: This video was deleted for violating our Terms of useThis content is no longer available |
DM006 | Publishing in progress. It has a reload button that will reload the video. Displays: Publication in progressVideo available shortly, please try reloading. |
DM007 | Video geo-restricted by its owner. Displays: Video not availableThis video is not available in your region |
DM008 | Explicit content. Displays: |
DM010 | Private content. Displays: Private videoThe publisher has marked this video as private |
DM011 | An encoding error occurred. Displays: Video not availableAn error occurred while encoding this video |
DM012 | Encoding in progress. It has a reload control that will reload the video Displays: Encoding in progressPlease try reloading |
DM013 | This video has no preset (no video stream). Displays: Video not availableThis video stream can't be reached right now |
DM014 | This video is blocked on your device by its owner. Displays: |
DM016 | Content not available on this website, it can only be watched on Dailymotion. Displays: |
DM017 | Live expired. Displays: Video no longer availableSorry, this content is no longer available |
DM018 | Live will start soon. Displays: Live in xH xM xS |
DM019 | This content has been uploaded by an inactive channel, its access is limited. Displays: Content is not availableThe video you requested is owned by inactive user. Its access has been limited |
DM020 | Content blocked on Dailymotion platforms (dailymotion.com and mobile applications). Displays: |
