# Authentification sur 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 méthode 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 enregistrées dans l’historique comme exécutées via automatisation).

#### Comment l’obtenir

Vous pouvez récupérer le *workspace token* lors de l’exécution d’un flux dans Hablla qui utilise un composant de l’API. Dans la réponse de la requête, il sera disponible dans l’en-tête `Authorization`.

> **📌 Exemple visuel :**

<figure><img src="/files/23b4d736d9196f338c28458cb82c6fca5dd2b024" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[*Le champ `Authorization` contient le jeton que vous devrez utiliser. Important : remplacez toujours par `token_aqui` lors du partage d’exemples publics afin d’éviter les fuites.*](#user-content-fn-1)[^1]
{% endhint %}

#### Identifier l’ID de l’espace de travail

L’ID de l’espace de travail (exemple : `64e683e59a0a699241b5222c`) est unique pour chaque 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_DE_L_ESPACE_DE_TRAVAIL>`

#### Exemple de requête

```http
curl "https://api.hablla.com/v2/workspaces/<ID_DE_L_ESPACE_DE_TRAVAIL>/persons?page=1&limit=50" \",
  -H "authorization: <VOTRE_JETON_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 robot) | ❌ Non      | ✅ Oui        |

[^1]:


---

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