API Errors

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 documentation

Still 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"
  }
}
FieldDescription
codeStable machine-readable error code (ie. RESOURCE_NOT_FOUND, MISSING_PERMISSIONS).
messageHuman-readable error description intended for developers.
correlation_idRequest correlation ID to share with Support Team when troubleshooting. May be null.
detailsStructured additional context. The shape of this object depends on the code value.
documentation_urlLink 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


CodeMeaningUsage
200 OKSuccessSuccessful GET or PATCH
201 CreatedResource createdSuccessful POST
204 No ContentNo bodySuccessful DELETE
500 Internal Server ErrorUnexpected errorUnhandled 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

  1. Always check the code field: The HTTP status code tells you the category, but code gives you the precise error for programmatic handling.
  2. Share correlation_id with Support: Include it when contacting Dailymotion Support to help trace your request.
  3. Read the details object: Provides structured context (ie. which permissions are missing, which parameter is invalid) to help you fix the request without guessing.
  4. Refresh tokens proactively: AUTHORIZATION_EXPIRED means 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 codesError description
DM001No video has been specified, you need to specify one.

Displays:
No video available Sorry, this content is no longer available
DM002Content has been deleted.

Displays:
Video has been deleted This video is no longer available
DM003Live content has ended, it is not available.

Displays:
Live stream offair
DM005Content 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
DM006Publishing in progress. It has a reload button that will reload the video.

Displays:
Publication in progressVideo available shortly, please try reloading.
DM007Video geo-restricted by its owner.

Displays:
Video not availableThis video is not available in your region
DM008

Explicit content.

Displays:
Sensitive contentThis content might not be suitable for all audiences.

DM010Private content.

Displays:
Private videoThe publisher has marked this video as private
DM011An encoding error occurred.

Displays:
Video not availableAn error occurred while encoding this video
DM012Encoding in progress. It has a reload control that will reload the video

Displays:
Encoding in progressPlease try reloading
DM013This 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:
Video not availableThis video has not been made available on your device by the owner

DM016

Content not available on this website, it can only be watched on Dailymotion.
It has a "Watch on Dailymotion" control that will open the video onsite.

Displays:
Unable to play videoThis video cannot be played on this site

DM017Live expired.

Displays:
Video no longer available
Sorry, this content is no longer available
DM018Live will start soon.

Displays:
Live in xH xM xS
DM019This 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:
Private videoThe publisher has marked this video as private