> For the complete documentation index, see [llms.txt](https://community.commandersact.com/trustcommander/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community.commandersact.com/trustcommander/fr/api/get-consents.md).

# Get Consents

## Consentement des utilisateurs

<mark style="color:blue;">`GET`</mark> `https://api.commander1.com/engage/user/`

Ce endpoint vous permet d'obtenir le consentement de la catégorie pour un utilisateur spécifique.

#### Query Parameters

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| token    | string  | Token de sécurité   |
| user\_id | string  | ID de l'utilisateur |
| site     | integer | ID du site          |

{% tabs %}
{% tab title="200 Le consentement a été récupéré avec succès" %}

```javascript
{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
```

{% endtab %}

{% tab title="404 Impossible de trouver un utilisateur correspondant à cette requête" %}

```javascript
{
    "message": "Person not found"
}
```

{% endtab %}
{% endtabs %}

## Consentement des visiteurs

<mark style="color:blue;">`GET`</mark> `https://api.commander1.com/engage/visitor/`

Ce endpoint vous permet d'obtenir le consentement de la catégorie pour un visiteur spécifique.

#### Query Parameters

| Name     | Type    | Description                                             |
| -------- | ------- | ------------------------------------------------------- |
| callback | string  | (optionnel) Callback pour une requête jsonp             |
| token    | string  | Token de sécurité                                       |
| site     | integer | ID du site                                              |
| tcid     | string  | ID de l'utilisateur (si le cookie n'est pas disponible) |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
```

{% endtab %}
{% endtabs %}
