> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/global-settings/global-settings-docs-pt-br/seguranca/tokens-de-api/gerenciando-tokens-de-api.md).

# Gerenciando tokens de API

{% hint style="success" %}

#### Credenciais de Usuário Obrigatórias

\[**Usuário Flosum**] - Qualquer Função
{% endhint %}

## ![](https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FSxcnKlaJKPzDqONWoDNv%2FSummary2-Small-Icon.svg?alt=media\&token=5e3253d0-a069-4ba5-9c06-83c70bd0b21d) Visão geral

Este artigo explica como visualizar, atualizar e excluir tokens de API.

## Gerenciando tokens de API

{% stepper %}
{% step %}

### Visualizar tokens de API

1. Clique em **Tokens de API** no menu da barra lateral esquerda.
2. Todos os tokens de API são listados na tabela e podem ser pesquisados pelo nome do token.
3. O **Expira em** a coluna lista a data em que o token expirará e deixará de conceder acesso à API da Flosum. Se esta coluna estiver em branco, isso significa que o token nunca expira.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2F3ixVZIYNTEy7CsmPrAap%2FManagingApiTokens-S01-01.png?alt=media&amp;token=30e973ab-ac46-4518-ba0a-d9c5a2904da9" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Atualizar token de API

Atualizar um token de API permite alterar seu tempo de expiração e gerar um novo token.

{% hint style="danger" %}
Ao atualizar um token, o anterior se torna inválido. Quaisquer serviços que usem esse token devem ser atualizados para o novo valor para continuarem funcionando.
{% endhint %}

1. Clique no **Atualizar** ícone no lado direito do token de API que você deseja atualizar.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FdPMs6GlJ9xqBO7OuSR9W%2FManagingApiTokens-S02-01.png?alt=media&amp;token=af426843-cc65-4cf6-82b2-d51a5b7d2449" alt="" width="563"><figcaption></figcaption></figure></div>
2. Clique no **Expiração** menu suspenso.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FmmDifG3Z2IughREgHcvV%2FManagingApiTokens-S02-02.png?alt=media&amp;token=94fd3341-391a-4256-bd14-5f5285298dba" alt="" width="375"><figcaption></figcaption></figure></div>
3. Selecione o número de dias que você deseja que o token de API permaneça válido.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FjIr1uvwtwEYzWuqeogj3%2FManagingApiTokens-S02-03.png?alt=media&amp;token=36dbb450-c54c-4398-9ebe-d21bf3e9cb56" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}

#### Expiração do token atualizado

Ao atualizar um token de API, a contagem regressiva de expiração recomeça a partir da data da atualização, e não da data original de criação do token. Por exemplo, se você criar um token de API no dia 1º do mês com expiração de 7 dias e atualizá-lo no dia 4 com outra expiração de 7 dias, o token expirará no dia 11.
{% endhint %}

{% hint style="warning" %}

#### Expiração do token

Uma vez que um token de API expira, quaisquer serviços que utilizem o token não poderão acessar a API do Flosum. Para serviços que requerem acesso contínuo, como um Provedor de Identidade SSO, selecione **Sem expiração**.
{% endhint %}

4. Clique em **Atualizar**.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FMPo68Ur9cS5ol0hcVJPp%2FManagingApiTokens-S02-04.png?alt=media&amp;token=ed6b0630-2b64-4651-beba-ba59c03cb88e" alt="" width="375"><figcaption></figcaption></figure></div>
5. Depois de atualizado, o token de API será exibido.
6. Clique no **Copiar** ícone para copiar o token e depois salvá-lo com segurança. Você não poderá visualizá-lo novamente.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2Fw2aYQtKUEcsndSeClaNe%2FManagingApiTokens-S02-05.png?alt=media&amp;token=b4c14ef9-b277-410b-9dfa-1545e8aff2f9" alt="" width="375"><figcaption></figcaption></figure></div>
7. Clique em **Fechar**.
   {% endstep %}

{% step %}

### Excluir token de API

Um token de API pode ser excluído a qualquer momento para revogar o acesso à API da Flosum para esse token.

{% hint style="danger" %}
Excluir um token de API revoga o acesso de todos os serviços que o utilizam. Esta ação não pode ser desfeita.
{% endhint %}

1. Clique no **Lixeira** ícone no lado direito do token de API que você deseja excluir.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FUnzqkjMQueAlul4uUlVh%2FManagingApiTokens-S03-01.png?alt=media&amp;token=ff60e884-b7e9-482e-a5e9-393601dd7a0d" alt="" width="563"><figcaption></figcaption></figure></div>
2. Clique em **Confirmar** na caixa de diálogo de confirmação de exclusão do token de API.

   <div align="left"><figure><img src="https://539069234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FYaaSFdGAbclbK8AaROA4%2FManagingApiTokens-S03-02.png?alt=media&amp;token=d9f7bc61-2fb5-4a6a-99c4-ef4c26f89d73" alt="" width="375"><figcaption></figcaption></figure></div>
3. Depois de excluído, todos os serviços que usam o token de API não terão mais acesso à API da Flosum.
   {% endstep %}
   {% endstepper %}


---

# 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.flosum.com/global-settings/global-settings-docs-pt-br/seguranca/tokens-de-api/gerenciando-tokens-de-api.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.
