> 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="/files/5c4e93aab4ecc7ec8f356a06e41dade33f519f71" 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 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/hablla-docs-es/api/autenticacion-en-la-api-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.
