> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/api-inc-cloud/autenticacao.md).

# Autenticação

Como autenticar as requisições com a apikey.

Todas as requisições à INC Cloud API exigem uma chave de acesso enviada no header **`apikey`**.

```http
GET /user/shop?locale=en HTTP/1.1
Host: inccloud-api.intelbras.com.br
apikey: SUA_API_KEY
Accept: application/json
```

Exemplo com `curl`:

```bash
curl "https://inccloud-api.intelbras.com.br/user/shop?locale=en" \
  -H "apikey: SUA_API_KEY"
```

## Como obter a apikey

A `apikey` é gerada pelo próprio usuário, direto na plataforma INC Cloud:

{% stepper %}
{% step %}

### Acesse o menu Sistema

Entre no INC Cloud com a sua conta e abra o menu **Sistema**.
{% endstep %}

{% step %}

### Abra a opção Open Platforms

Dentro de **Sistema**, selecione **Open Platforms**.
{% endstep %}

{% step %}

### Ative a chave

Clique em **Ativar** para gerar a sua `apikey`. Copie o valor exibido e guarde-o em local seguro.
{% endstep %}
{% endstepper %}

Depois de ativada, a chave pode ser gerenciada na mesma tela:

| Ação          | Quando usar                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| **Alterar**   | Gera uma nova chave no lugar da atual. Use se a chave tiver sido exposta ou para fazer a troca periódica. |
| **Desativar** | Bloqueia o acesso pela API. As integrações que usam a chave passam a receber **HTTP 401**.                |

{% hint style="warning" %}
Ao **alterar** a chave, a anterior deixa de funcionar. Atualize a `apikey` em todas as integrações que a utilizam.
{% endhint %}

## Chave ausente ou inválida

Se o header `apikey` não for enviado, ou se a chave for inválida ou estiver desativada, a API responde com **HTTP 401**:

```json
{
  "message": "Invalid authentication credentials"
}
```

## Boas práticas

* Guarde a `apikey` em variáveis de ambiente ou num cofre de segredos, nunca no código-fonte.
* Faça as chamadas a partir do seu servidor (back-end), não do navegador ou de apps móveis, para não expor a chave.
* Se a chave vazar, gere uma nova em **Sistema → Open Platforms → Alterar**.


---

# 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://portal-integracao.intelbras.com.br/api-inc-cloud/autenticacao.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.
