---
updatedAt: 2026-08-27T13:04:31.000Z
agentTools:
  projectIndex: https://developers.dailymotion.com/llms.txt
---

# Get started with Authentication

<Callout icon="📘" theme="info">
  ### You are reading **API v2 documentation**

  Still using the Legacy API? Access the <Anchor target="_blank" href="https://developers.dailymotion.com/v0/docs/welcome">Legacy API documentation</Anchor>.
</Callout>

<br />

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.

<br />

***

## 1 - Create a private API key

1. Log into your [Dailymotion Studio](https://www.dailymotion.com/partner/api-keys/) with an **Owner** or **Admin** account.
2. Go to **Organization → API keys → Create API key**.
3. Select **Private API key**, and give it a **title** and **description**.  ￼
4. Define whether the key applies to all channels in your Organization, or to specific ones only.
5. Toggle on the **permissions** tied to the key.
6. Click **Create** and **securely store your API key and secret**.

<Callout icon="❗️" theme="error">
  ### Important

  **The API secret is only shown once.** Make sure to save it before closing the pop-up window.
</Callout>

<br />

## 2 - Request an access token

Make a `POST` request to the token endpoint:

```text
POST https://oauth2.dailymotion.com/v2/token
```

Request header:

| Header         | Value                               |
| :------------- | :---------------------------------- |
| `Content-Type` | `application/x-www-form-urlencoded` |

Include the following request body parameters:

| Parameter       | Description                                                                                                                                  |
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
| `grant_type`    | Set to `client_credentials`                                                                                                                  |
| `client_id`     | The API key from [step 1](https://developers.dailymotion.com/v2/docs/authenticate#1---create-a-private-api-key)                              |
| `client_secret` | The API secret from [step 1](https://developers.dailymotion.com/v2/docs/authenticate#1---create-a-private-api-key)                           |
| `scope`         | Space-separated list of required <Anchor target="_blank" href="https://developers.dailymotion.com/v2/reference/api-scopes#/">scopes</Anchor> |

Request example:

```curl
curl --request POST \
     --url https://oauth2.dailymotion.com/v2/token \
     --header 'accept: application/json' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data-urlencode grant_type=client_credentials \
     --data-urlencode client_id=<YOUR_CLIENT_ID> \
     --data-urlencode 'client_secret=<YOUR_CLIENT_SECRET>' \
     --data-urlencode scope=bundle.organization
```

<br />

## 3 - Authentication response

If your request is successful, you'll get a JSON response containing the access token:

```json
{
  "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                                     |

<br />

## 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
curl -X GET https://api.dailymotion.com/v2/me \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1N..."
 
// Change "/me" for any API call you want to perform
```

<br />

<br />

***

<br />

## Security 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_secret` in 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`)

<br />

<Cards>
  <Card title="Authentication: Try it out!" href="https://developers.dailymotion.com/v2/reference/request-access-token" icon="fa-code">

  </Card>
</Cards>

<br />

<br />