> For the complete documentation index, see [llms.txt](https://docs.aviator.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aviator.co/aviator-cli/how-to-guides/create-a-user-access-token.md).

# How to Create an Access Token

## GitHub Personal Access Token

If [GitHub CLI](https://cli.github.com/) is installed and set up on your computer, av CLI automatically uses the same credential for interacting with GitHub. Alternatively, you can create a personal access token (classic) to authenticate with GitHub on your behalf.

1. Navigate to <https://github.com/settings/tokens/new>.
2. Create a name and expiration for your token.
   * The generated token should have the `repo` scope (all other scopes can be left un-checked).

![Required permissions for the GitHub personal access token that you will use with av](/files/ieFzQbSZv8gDrqOclBcO)

Put the created Personal Access Token in `~/.av/config.yaml`.

<pre class="language-yaml" data-title="~/.av/config.yaml" data-line-numbers><code class="lang-yaml"><strong>github:
</strong>    token: "ghp_abcdefghijklmnop"
</code></pre>

## Aviator User Access Token

User Access Tokens are used to authenticate with the Aviator REST API and Aviator GraphQL API.

1. Navigate to <https://app.aviator.co/settings/personal/api_token>.
2. Create a name and expiration for your token.
   * The token should be in the format `av_uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`. Add it to your Aviator configuration file `~/.av/config.yaml` as shown below.

{% code title="\~/.av/config.yaml" lineNumbers="true" %}

```yaml
aviator:
    apiToken: "av_uat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

{% endcode %}

You can verify that your token works with `av auth`.

```
$ av auth
Logged in to GitHub as <your_email>.
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aviator.co/aviator-cli/how-to-guides/create-a-user-access-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
