> For the complete documentation index, see [llms.txt](https://developers.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.felt.com/rest-api/authentication.md).

# Authentication

All calls to the Felt API authenticate with a personal access token sent as a `Bearer` token in the request header:

```http
Authorization: Bearer <API Token>
```

Tokens start with the `felt_pat_` prefix. Since a token grants access to your account, store it securely — treat it like a password. Prefer environment variables or a secrets manager over hardcoding tokens in source code.

## Creating a token

You can create an API token in the [Developers tab of the Workspace Settings page](https://felt.com/maps/latest/developers):

<figure><img src="/files/sfwubRDKAIdShrjmBZku" alt=""><figcaption><p>Generate as many API tokens as you need</p></figcaption></figure>

<div><figure><img src="/files/yljedkWCSC2stEUNH5bW" alt=""><figcaption><p>Give your API token a unique name</p></figcaption></figure> <figure><img src="/files/FiJ7IB6GfEi6fvw7ri7E" alt=""><figcaption><p>Make sure to copy your token to a secure location</p></figcaption></figure></div>

Be sure to take note of the token before closing the dialog; you won't have a second chance to view it. Only a hash of your token is stored on Felt's servers.

## How tokens behave

* **Workspace-scoped.** Each token belongs to the workspace it was created in and can only access that workspace's resources. Requests against another workspace's resources fail with `401`.
* **They act as you.** Requests made with your token have your account's permissions in that workspace.
* **No expiry.** Tokens remain valid until revoked. To rotate a token, create a new one in workspace settings, switch your integration over, and revoke the old one.
* **Failed authentication returns `401`** with a JSON body explaining the problem — see [Errors and rate limits](/rest-api/errors-and-rate-limits.md).

## Making an authenticated request

{% tabs %}
{% tab title="curl" %}

```bash
# This looks like:
# FELT_API_TOKEN="felt_pat_ABCDEFUDQPAGGNBmX40YNhkCRvvLI3f8/BCwD/g8"
FELT_API_TOKEN="<YOUR_API_TOKEN>"

curl \
  -H "Authorization: Bearer ${FELT_API_TOKEN}" \
  "https://felt.com/api/v2/user"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

# This looks like:
# api_token = "felt_pat_ABCDEFUDQPAGGNBmX40YNhkCRvvLI3f8/BCwD/g8"
api_token = "<YOUR_API_TOKEN>"

r = requests.get(
  "https://felt.com/api/v2/user",
  headers={"Authorization": f"Bearer {api_token}"}
)
assert r.ok
print(r.json())
```

{% endtab %}
{% endtabs %}

A successful response returns your user details, confirming the token works:

```json
{
  "id": "AbC123dEfG456hIjK789lM",
  "type": "user",
  "name": "Your Name",
  "email": "you@example.com"
}
```

From here, head to [Getting started](/rest-api/getting-started.md) to create your first map via the API.


---

# 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://developers.felt.com/rest-api/authentication.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.
