> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

## Introduction

* To get started with our APIs, use the endpoint below to generate an Access Token with your API credentials.

* The access token is a Bearer token to be included in the Authorization Header of all API requests.

* Multiple tokens may be generated, each valid for 15 minutes or 900 seconds.

***

## Endpoint

POST

```http theme={null}
https://api.criteo.com/oauth2/token
```

> [!NOTE]
>
> If you receive a `401 Unauthorized` HTTP status code, it means your access token has expired. Generate a new access token to continue making requests.

***

## Parameters

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `client_id`
      </td>

      <td>
        Set up your API credentials through our Developer Portal
      </td>
    </tr>

    <tr>
      <td>
        `client_secret`
      </td>

      <td>
        Set up your API credentials through our Developer Portal
      </td>
    </tr>

    <tr>
      <td>
        `grant_type`
      </td>

      <td>
        Must be

        `client_credentials`

        or

        `authorization_code`
      </td>
    </tr>
  </tbody>
</table>

For more info, check [OAuth App Implementation](https://developers.criteo.com/criteo-apis/docs/oauth-app-implementation).

***

## Generate an Access Token

* This endpoint generates a new access token using your API credentials

POST

```http theme={null}
https://api.criteo.com/oauth2/token
```

### Sample Request

```bash theme={null}
curl -X POST "https://api.criteo.com/oauth2/token" \
    -d 'client_id={client_id}' \
    -d 'client_secret={client_secret}' \
    -d 'grant_type=client_credentials'
```

### Sample Response

```json theme={null}
{
    "access_token": "&lt;TOKEN STRING&gt;",
    "token_type": "Bearer",
    "expires_in": 900
}
```

***
