# S'authentifier à l'API

{% hint style="info" %}

### Info

A l'exception de l'authentification, toutes les requêtes sur l'API KIS nécessitent d'être authentifié.
{% endhint %}

Pour vous authentifier vous devez avoir créé un accès API et être en possession d'un `App_token` et un `Secret` (cf [Clé API](/documentation/documentation-api/introduction/cle-api.md)).&#x20;

### Requête

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl --request POST \
     --url https://api.getkis.io/api/v1/api_access_auth/sign_in \
     --header 'accept: text/plain' \
     --header 'content-type: application/json' \
     --data '
{
    "app_token": "VOTRE APP_TOKEN",
    "secret": "VOTRE SECRET"
}
```

{% endcode %}

### **Paramètres**&#x20;

| Paramètre   | Type   | Description                   | Obligatoire ? |
| ----------- | ------ | ----------------------------- | ------------- |
| `app_token` | String | App\_token de votre accès API | Oui           |
| `secret`    | String | Secret de votre accès API     | Oui           |

{% hint style="warning" %}

### 🚧Rester authentifié

**Pour rester authentifié par la suite**, récupérez dans le header de la réponse, l'attribut :

* `authorization`

Puis insérez-le dans le header de toutes vos prochaines requetes.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://doc.kis.work/documentation/documentation-api/authentification/sauthentifier-a-lapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
