> For the complete documentation index, see [llms.txt](https://docs.hablla.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hablla.com/french/api/authentification-dans-lapi-de-hablla.md).

# Authentification dans l'API de Hablla

L’API Hablla utilise une authentification via Workspace Token, une approche recommandée pour les intégrations, les automatisations et les robots.

### Authentification via Workspace Token (recommandé)

Le **Workspace Token** est un jeton directement lié à un espace de travail spécifique. C’est la forme d’authentification la plus pratique et la plus robuste pour les intégrations et les automatisations.

**Principaux avantages :**

* Permet l’accès à la plupart des routes de l’API.
* **N’expire pas**.
* Peut être utilisé en toute sécurité dans des environnements automatisés.
* Offre une traçabilité (les actions sont consignées dans l’historique comme exécutées via automatisation).

#### Comment l’obtenir

Vous pouvez obtenir le *jeton d’espace de travail* en accédant <https://studio.hablla.com/> comme administrateur. \
\
Après vous être connecté, accédez au menu des paramètres via l’icône d’engrenage dans le coin supérieur droit. Dans les informations de l’entreprise, le jeton sera affiché.&#x20;

> **📌 Exemple visuel :**

<figure><img src="https://2835740493-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrmxWrIrMauHcIrsuqfGq%2Fuploads%2FF60uLVTyqS5RjXkkUe13%2Fimage.png?alt=media&amp;token=47312083-51f0-40a7-9083-822846cef968" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[*Seul l’utilisateur de type Administrateur a accès à cette information*](#user-content-fn-1)[^1][*. Important : remplacez toujours par `token_ici` lorsque vous partagez des exemples publics afin d’éviter les fuites.*](#user-content-fn-1)[^1]
{% endhint %}

#### Identification de l’ID de l’espace de travail

L’ID de l’espace de travail (exemple : `64e683e59a0a699241b5222c`) est unique par client. Vous pouvez le trouver directement dans l’URL du navigateur lorsque vous accédez à votre environnement dans Hablla Studio :

`https://studio.hablla.com/workspaces/<ID_DA_WORKSPACE>`

#### Exemple de requête

```http
curl "https://api.hablla.com/v2/workspaces/<ID_DA_WORKSPACE>/persons?page=1&limit=50" \
  -H "authorization: <VOTRE_TOKEN_ICI>" \
  -H "accept: application/json"
```

### Conclusion

| Type de jeton   | Idéal pour                            | Actions traçables ?    | Expiration | Recommandé ? |
| --------------- | ------------------------------------- | ---------------------- | ---------- | ------------ |
| Workspace Token | Intégrations, automatisations, robots | ✅ Oui (comme un robot) | ❌ Non      | ✅ Oui        |

[^1]:


---

# 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://docs.hablla.com/french/api/authentification-dans-lapi-de-hablla.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.
