> For the complete documentation index, see [llms.txt](https://help.citrusad.com/retail-media-interface/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.citrusad.com/retail-media-interface/partner/fr/partner-api-authentication/user-key-authentication.md).

# Jeton de clé utilisateur

## Demander des jetons

Pour recevoir votre jeton d'accès requis, faites une demande au point de terminaison `/user-key-token` en ajoutant les paramètres suivants en utilisant le format `application/x-www-form-urlencoded` avec un encodage de caractères UTF-8 dans le corps de la requête HTTP.

```http
POST https://auth.<env>.citrusad.com/v2/user-key-token
Content-Type: application/x-www-form-urlencoded
user_key=<USER_KEY>
```

Vous recevrez une réponse avec un `accessToken`,`expiresIn`, et `tokenType`.

```json
{
    "accessToken": "ACCESS_TOKEN",
    "expiresIn": 84000,
    "tokenType": "Bearer"
}
```

{% hint style="info" %}
Votre jeton d'**accès** est utilisé pour accéder à l'API Epsilon Retail Media .
{% endhint %}

## Jeton de rafraîchissement

Lorsque votre jeton d'accès expire, vous recevrez une erreur de jeton non valide de l'API de campagne. Dans ce cas, vous ferez une demande au point de terminaison `/token` avec votre jeton de rafraîchissement comme illustré dans le schéma ci-dessous :

<figure><img src="/files/uIT0AnVMC3tAEMciKd9F" alt="Authentication refresh flow.png" width="100%"><figcaption></figcaption></figure>

Généralement, un utilisateur n'aura besoin d'un nouveau jeton d'accès que lorsque le précédent expire, ou lorsqu'il obtient ou perd l'accès à des ressources rattachées à ses revendications. C'est une mauvaise pratique d'appeler le point de terminaison pour obtenir un nouveau jeton d'accès pour chaque requête envoyée à notre API.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.citrusad.com/retail-media-interface/partner/fr/partner-api-authentication/user-key-authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
