Get started with Authentication
You are reading API v2 documentationStill using the Legacy API? Access the Legacy API documentation.
To access protected resources and perform actions through the Dailymotion API (such as uploading a video, creating a Player, etc), your application must be granted the appropriate permissions.
This is achieved through two combined elements:
- A private API keys generated from the Dailymotion Studio of the profile you intend to interact with.
- An access token obtained via the OAuth 2.0 authentication flow.
1 - Create a private API key
- Log into your Dailymotion Studio with an Owner or Admin account.
- Go to Organization → API keys → Create API key.
- Select Private API key, and give it a title and description. 
- Define whether the key applies to all channels in your Organization, or to specific ones only.
- Toggle on the permissions tied to the key.
- Click Create and securely store your API key and secret.
2 - Request an access token
Make a POST request to the token endpoint:
POST https://oauth2.dailymotion.com/v2/tokenRequest header:
| Header | Value |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Include the following request body parameters:
Request example:
curl -X POST https://oauth2.dailymotion.com/v2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=<YOUR_CLIENT_ID>" \
-d "client_secret=<YOUR_CLIENT_SECRET>" \
-d "scope=bundle.publisher"3 - Authentication response
If your request is successful, you'll get a JSON response containing the access token:
{
"access_token": "eyJhbGciOiJSUzI1N...",
"token_type": "Bearer",
"expires_in": 1800,
"scope": "bundle.publisher"
}| Response field | Description |
|---|---|
access_token | JWT token to use in API requests |
token_type | Always Bearer |
expires_in | Token validity in seconds. Tokens expire after 30 minutes (1800 seconds). |
scope | The permissions granted to this token |
4 - Use the access token
Include the access token in the Authorization header of every API request.
Format:
Authorization: Bearer <ACCESS_TOKEN>
Request example:
curl -X GET https://api.dailymotion.com/v2/me \
-H "Authorization: Bearer eyJhbGciOiJSUzI1N..."
// Change "/me" for any API call you want to performSecurity best practices
- Token expiration: Access tokens expire after 30 minutes (1800 seconds). You'll need to request a new token when the current one expires.
- Secret: Never expose your
client_secretin client-side code or public repositories. - Scope: Only request the scopes that your application actually needs. To request multiple scopes, separate them by a space (eg.
video.manage player.manage)
Updated 25 days ago
Did this page help you?
