> ## Documentation Index
> Fetch the complete documentation index at: https://docs.escrybe.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Every request is authenticated with your account security token.

Every account has a personal **`securityToken`**. Find it in the panel under
**My Settings → API access** (`/opcoes`). Treat it like a password — it grants
full access to your account's orders and credits.

There are **two authentication styles** depending on the product.

## API token (Letters, E-mail, Receipts)

The core letter and e-mail routes take the token **in the URL path** (read
routes) or as the **`userSecurityToken` form field** (create routes). The
`securityToken` header and `Authorization: Bearer` forms work on the logo and
receipts endpoints.

<CodeGroup>
  ```bash URL path (letters/e-mail read routes) theme={null}
  curl "https://app.escrybe.com.br/api/v2/balance/YOUR_TOKEN"
  ```

  ```bash Header (logo, receipts) theme={null}
  curl "https://app.escrybe.com.br/api/v2/logo" \
    -H "securityToken: YOUR_TOKEN"
  ```

  ```bash Bearer (logo, receipts) theme={null}
  curl "https://app.escrybe.com.br/api/receipts/v1/get?order_id=2607031" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```
</CodeGroup>

<Info>
  For `POST` endpoints (e.g. creating an order or e-mail) send
  `userSecurityToken` as a form field in the request body. It is also accepted
  as a query parameter wherever the header forms work.
</Info>

## HTTP Basic (WhatsApp)

The WhatsApp endpoints use **HTTP Basic Auth**, where the username is your
account **e-mail** and the password is your **`securityToken`**.

<CodeGroup>
  ```bash cURL (auto-encoded) theme={null}
  curl "https://app.escrybe.com.br/api/whatsapp/v1/senders/get" \
    -u "you@example.com:YOUR_TOKEN"
  ```

  ```bash Manual header theme={null}
  # Authorization: Basic base64("you@example.com:YOUR_TOKEN")
  curl "https://app.escrybe.com.br/api/whatsapp/v1/senders/get" \
    -H "Authorization: Basic eW91QGV4YW1wbGUuY29tOllPVVJfVE9LRU4="
  ```
</CodeGroup>

## Errors

| Status | Meaning                                                |
| ------ | ------------------------------------------------------ |
| `401`  | Missing or invalid credentials                         |
| `403`  | Authenticated, but not allowed to access this resource |

See [Errors](/en/errors) for the full envelope shapes.
