Documentation
API tokens
Create, disable and rotate the organization's tokens in the dashboard, and understand permissions and who can see each token's value.
What a token is
An API token identifies an organization in requests to the API. It belongs to the organization where it was created and acts as that organization: the charges and invoices issued with the token stay in that organization, and no organization identifier travels in the request.
The token does not go through member permissions. Whoever has the token's value acts as the whole organization in the API, so the value is treated as a secret.
The token has no expiration date. It is valid until it is disabled or deleted.
The token works only on the public API:
| Resource | Routes | Page |
|---|---|---|
| Pix charges | /v1/pixs | Create a Pix charge |
| Static Pix | /v1/pix-statics | Static Pix |
| Boletos | /v1/boletos | Issue a boleto |
| Invoices | /v1/fiscal-invoices | Issue an NFC-e |
| Card machine charges | /v1/pinpads | Card machine charges |
Everything else — bank and fiscal credentials, webhooks, tokens, logs, organizations, members and subscription — is done in the dashboard, with your signed-in session.
To send the token in requests, see Authentication.
Create a token
Tokens are managed in the dashboard, under Integração → Tokens (Integration → Tokens). The API does not create, edit or delete tokens with an API token: those operations require a dashboard session.
Click Criar token (Create token) and fill in:
| Field | Required | Values |
|---|---|---|
| Nome do Token (Token name) | yes | text that identifies the token, such as ERP produção |
| Descrição (Description) | yes | text that identifies what the token is used for |
| Permissões (Permissions) | yes | at least one of Leitura (Read), Escrita (Write) and Exclusão (Delete) |
| Pinpad | no | off by default. Turn it on to charge on card machines through the API |
The value is generated when you save and shows in the token list.
The value copied from the dashboard already starts with Bearer . It is the full content of the Authorization header. In the examples in this documentation, $INTOPAYS_TOKEN holds only the part after Bearer .
Permissions
| Permission | Default | Behavior today |
|---|---|---|
Read (read) | on | recorded on the token; does not block requests |
Write (write) | off | recorded on the token; does not block requests |
Delete (delete) | off | recorded on the token; does not block requests |
Pinpad (pinpad) | off | unlocks card machine charges (/v1/pinpads); without it, those routes answer 403 with Este token não tem a permissão de pinpad. Ative-a em Tokens. |
The Read, Write and Delete permissions are stored on the token, but the API does not refuse a request because of them. A token created with Read only can still create Pix charges (Pix is Brazil's instant payment system).
Edit, disable and delete
In the token's menu, Editar token (Edit token) changes the name, the description, the status and the Pinpad permission.
| Action | Effect |
|---|---|
| Disable (Status do Token, token status) | the API starts refusing the token immediately; re-enabling accepts the same value again |
| Delete | the API starts refusing the token immediately; deletion cannot be undone |
A token's value does not change when you edit it. To change the value, create another token.
Who sees the value
| Who | What they see |
|---|---|
| The organization's owner | the full value, with the reveal and copy buttons |
| A member with the Revelar e copiar (Reveal and copy) permission | the full value, with the reveal and copy buttons |
| A member who can only see the token list | the last 6 characters and the notice Sem permissão para ver o valor (No permission to see the value) |
The member permissions are Tokens and Valor do token (olho e copiar) (Token value — eye and copy), in the Integração area of a permission group. Seeing the list does not reveal the value: they are separate permissions.
Good practices
- Keep the token in an environment variable or a secrets manager, never in the code or the repository.
- Create one token per integrated system. The name and the description say where each one is used, and you can delete one without stopping the others.
- To replace a token, create the new one, update your system and only then delete the old one. Both are valid at the same time until the deletion.
- If a token leaks, delete it. Disabling also stops its use, but the same value becomes valid again if the token is re-enabled.
- Give Revelar e copiar only to the members who set up integrations.
Errors
| Status | Response | Fix |
|---|---|---|
401 | Token inválido. Por favor, verifique se o token existe e se está ativo. (invalid token; check that it exists and is active) | The token was disabled or deleted. Re-enable it or create another one under Integração → Tokens |
401 | Desculpe, o token de autenticação é inválido. Por favor, verifique seu token ou faça login novamente para obter um novo. (the authentication token is invalid) | The value sent does not match. Copy the value again from the dashboard |
401 | Ops! Parece que o token de autenticação está ausente. Certifique-se de incluir um token válido na sua requisição para acessar a API da Intopays. (the authentication token is missing) | Send the Authorization header as Bearer <token> |
403 | This operation requires a signed-in session; integration tokens cannot manage the account. | The operation is done in the dashboard, not with an API token |
403 | Este token não tem a permissão de pinpad. Ative-a em Tokens. (this token lacks the pinpad permission) | Turn on the Pinpad permission in Editar token |
Missing something on this page? Contact support from the dashboard and we'll update the docs.
