> ## 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

export const EndpointBadge = ({method = "GET", children}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-[#2AB673]"
    },
    POST: {
      bg: "mint-bg-[#3064E3]"
    },
    PUT: {
      bg: "mint-bg-[#C28C30]"
    },
    PATCH: {
      bg: "mint-bg-[#DA622B]"
    },
    DELETE: {
      bg: "mint-bg-[#CB3A32]"
    },
    API: {
      bg: "mint-bg-black"
    }
  };
  const key = method.toUpperCase();
  const styles = METHOD_STYLES[key] ?? METHOD_STYLES.API;
  return <div className="relative mt-7">
      <span className={`absolute -top-2 -left-2 z-10 ${styles.bg} text-white px-2.5 py-0.5 rounded-full text-xs font-bold tracking-wide`}>
        {key}
      </span>
      {children}
    </div>;
};

# 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

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/oauth2/token
  ```
</EndpointBadge>

<Info>
  **Note**

  Generate another access token when it expires, signaled by a `401 Unauthorized` HTTP status code
</Info>

***

# Parameters

| Parameter       | Description                                              |
| --------------- | -------------------------------------------------------- |
| `client_id`     | Set up your API credentials through our Developer Portal |
| `client_secret` | Set up your API credentials through our Developer Portal |
| `grant_type`    | Must be `client_credentials` or `authorization_code`     |

For more info, check [OAuth App Implementation](/retail-media/v2025.01/docs/oauth-app-implementation)

***

# Generate an Access Token

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

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/oauth2/token
  ```
</EndpointBadge>

### Sample Request

<CodeGroup>
  ```bash cURL 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'
  ```
</CodeGroup>

### Sample Response

<CodeGroup>
  ```json JSON theme={null}
  {
      "access_token": "<TOKEN STRING>",
      "token_type": "Bearer",
      "expires_in": 900
  }
  ```
</CodeGroup>

***

**What’s Next**

* [API Response](/retail-media/v2025.01/docs/api-response)
* [API Pattern](/retail-media/v2025.01/docs/api-pattern)
* [Bulk Calls](/retail-media/v2025.01/docs/bulk-calls)
* [Campaign Structure](/retail-media/v2025.01/docs/campaign-structure)
* [List of Endpoints](/retail-media/v2025.01/docs/criteo-api-swagger)
* [Rate Limits](/retail-media/v2025.01/docs/rate-limits)
* [Statuses](/retail-media/v2025.01/docs/campaign-lineitem-status)
