> 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/api/autenticacao-na-api-do-hablla.md).

# Autenticação na API do Hablla

A API do Hablla utiliza autenticação via Workspace Token, uma abordagem recomendada para integrações, automações e robôs.

### Autenticação via Workspace Token (Recomendado)

O **Workspace Token** é um token vinculado diretamente a uma área de trabalho específica. Ele é a forma mais prática e robusta de autenticação para integrações e automações.

**Principais Vantagens:**

* Permite acesso à maioria das rotas da API.
* **Não expira**.
* Pode ser usado em ambientes automatizados com segurança.
* Oferece rastreabilidade (as ações ficam registradas no histórico como executadas via automação).

#### Como obter

Você pode obter o *workspace token* acessando <https://studio.hablla.com/> como administrador. \
\
Após entrar, acesse o menu de configurações através da engrenagem no canto superior direito. Dentro das informações da empresa será exibido o token.&#x20;

> **📌 Exemplo visual:**

<figure><img src="https://1879311494-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" %}
[*Somente o usuário do tipo Administrador tem acesso a obter essa informação*](#user-content-fn-1)[^1][*. Importante: substitua sempre por `token_aqui` ao compartilhar exemplos públicos para evitar vazamentos.*](#user-content-fn-1)[^1]
{% endhint %}

#### Identificando o ID da Workspace

O ID da workspace (exemplo: `64e683e59a0a699241b5222c`) é único por cliente. Você pode encontrá-lo diretamente na URL do navegador ao acessar seu ambiente no Hablla Studio:

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

#### Exemplo de requisição

```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"
```

### Conclusão

| Tipo de Token   | Ideal para                     | Ações rastreáveis? | Expiração | Recomendado? |
| --------------- | ------------------------------ | ------------------ | --------- | ------------ |
| Workspace Token | Integrações, automações, robôs | ✅ Sim (como robô)  | ❌ Não     | ✅ Sim        |

[^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/api/autenticacao-na-api-do-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.
