> 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/hablla-docs-es/api/autenticacion-en-la-api-de-hablla.md).

# Autenticación en la API de Hablla

La API de Hablla utiliza autenticación mediante Workspace Token, un enfoque recomendado para integraciones, automatizaciones y robots.

### Autenticación mediante Workspace Token (Recomendado)

El **Token de Workspace** es un token vinculado directamente a un espacio de trabajo específico. Es la forma más práctica y robusta de autenticación para integraciones y automatizaciones.

**Principales ventajas:**

* Permite acceso a la mayoría de las rutas de la API.
* **No expira**.
* Puede usarse con seguridad en entornos automatizados.
* Ofrece trazabilidad (las acciones quedan registradas en el historial como ejecutadas mediante automatización).

#### Cómo obtener

Puedes obtener el *token de workspace* accediendo <https://studio.hablla.com/> como administrador. \
\
Después de entrar, accede al menú de configuración a través del engranaje en la esquina superior derecha. Dentro de la información de la empresa se mostrará el token.&#x20;

> **📌 Ejemplo visual:**

<figure><img src="https://4006966930-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" %}
[*Solo el usuario de tipo Administrador tiene acceso para obtener esta información*](#user-content-fn-1)[^1][*. Importante: sustituye siempre por `token_aqui` al compartir ejemplos públicos para evitar filtraciones.*](#user-content-fn-1)[^1]
{% endhint %}

#### Identificando el ID del Workspace

El ID del workspace (ejemplo: `64e683e59a0a699241b5222c`) es único por cliente. Puedes encontrarlo directamente en la URL del navegador al acceder a tu entorno en Hablla Studio:

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

#### Ejemplo de solicitud

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

### Conclusión

| Tipo de token      | Ideal para                              | ¿Acciones rastreables? | Expiración | ¿Recomendado? |
| ------------------ | --------------------------------------- | ---------------------- | ---------- | ------------- |
| Token de Workspace | Integraciones, automatizaciones, robots | ✅ Sí (como robot)      | ❌ No       | ✅ Sí          |

[^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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hablla.com/hablla-docs-es/api/autenticacion-en-la-api-de-hablla.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
