> For the complete documentation index, see [llms.txt](https://docs.zapsign.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapsign.com.br/autenticacao/jwt-recomendado/obter-token-de-acesso.md).

# Obter token de acesso

Para **obter o Token de Acesso**, **faça uma requisição ao endpoint de autenticação com as credenciais do seu usuário ZapSign.** Este endpoint retornará tanto o Token de Acesso quanto o Token de Atualização.

<mark style="color:green;">`POST`</mark> `https://api.zapsign.com.br/api/v1/auth/token/{{ID_organização}}`

{% code title="Request Body" %}

```json
{
    "username": "dev@exemplo.com.br",
    "password": "Senhaforte123"
}
```

{% endcode %}

{% hint style="info" %}
Você  pode obter o ID da sua organização navegando até **configurações>integrações>api token>ID da organização.**
{% endhint %}

<figure><img src="https://3085168645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4noMoX5ZGb2-RhWjjf-887967055%2Fuploads%2Fhz5dVOpyrhB0l0vUbpIq%2Fimage.png?alt=media&amp;token=046226c1-9d8c-4a89-91a2-f6b0e7787c80" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="200: OK Autenticação realizada com sucesso" %}
{% code overflow="wrap" %}

```json
{
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcxMDE3ODM0NCwianRpIjoiYjhmZjMwNDJmNjRkNDJmM2FlMzczZmRiNDQ3YTQ2NGEiLCJ1c2Vyb",
    "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
```

{% endcode %}
{% endtab %}

{% tab title="401: Unauthorized Credenciais Inválidas" %}
{% code overflow="wrap" %}

```json
{
    "detail": "No active account found with the given credentials"
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Tentativas de login excedidas" %}

```javascript
{
    "message": "Rate limit exceeded"
}
```

{% endtab %}
{% endtabs %}

## Uso do Token&#x20;

Após obter seu Token, você poderá autenticar-se nos endpoints da ZapSign, incluindo o seu token no cabeçalho "Authorization" da sua requisição, utilizando o prefixo "Bearer". Exemplo:

```javascript
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzA5ODIwMTQxLCJqdGkiOiIxMGM4YmVhOTkxNDM0ZGU5OWQxNmViMGE2ZTA3MTU1YyIsInVzZXJfaWQiOjEsInR5cGUiOiJwdWJsaWMifQ.GhMKXDyiidHrWCSmU3I9e6-zDm61mBmDqEavir4IW0c'
  },
```

Após uma hora, você precisará se autenticar novamente, saiba como no capítulo ["Atualize seu token de acesso"](/autenticacao/jwt-recomendado/atualize-seu-token-de-acesso.md).


---

# 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.zapsign.com.br/autenticacao/jwt-recomendado/obter-token-de-acesso.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.
