> For the complete documentation index, see [llms.txt](https://docs.datafy.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datafy.io/set-up-and-installation/datafy-installation/token-generation.md).

# Token Generation

Datafy uses a security token to identify communication from the agents installed on your machines, and to associate it with your account. The token is secret, and cannot be accessed again after it is generated.

{% hint style="info" %}
The token is used for the [Datafy agent installation](/set-up-and-installation/datafy-installation/installation.md). If you'd rather not issue and manage a long-lived token, see [Tokenless Installation](/set-up-and-installation/advanced-setup/tokenless-installation.md).
{% endhint %}

## Creating a New Token

{% hint style="info" %}
Tokens are associated with a specific Datafy app account, which is associated with a single AWS account. Generate a new token from the relevant Datafy app account for every AWS account Datafy is installed on.
{% endhint %}

1. Open the account menu at the top right corner of the Datafy app
2. Open the **Admin Portal**
3. Navigate to the **API Tokens** section in the sidebar
4. Select **Generate Token**
5. Configure the token:
   * Give it a meaningful description, like `<your-company>-datafy-token`.
   * Set the role to **Admin**
   * Set expiration date to `never`
6. Save the generated token in a secure manner, and use it when [installing the Datafy agent](/set-up-and-installation/datafy-installation/installation.md)

{% hint style="warning" %}
Make sure to save tokens in a secure manner, so they are accessible for future installations in the same account
{% endhint %}


---

# 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.datafy.io/set-up-and-installation/datafy-installation/token-generation.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.
