> For the complete documentation index, see [llms.txt](https://falcon-bot.gitbook.io/falcon-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://falcon-bot.gitbook.io/falcon-api/getting-started/authentication.md).

# Authentication

All requests must include a Bearer token in the `Authorization` header.

```
Authorization: Bearer
```

Ensure your API key is set in your environment variables before sending requests.

***

## Obtaining an API Key

To obtain an API key, create an account in the Falcon dashboard.

1. Go to <https://api.polymarketanalytics.com>
2. Sign in using your email address.
3. Once logged in, navigate to the API Keys page.
4. Your API key will be automatically generated and ready to use.

You can copy the key from the dashboard and use it as a Bearer token to authenticate Falcon API requests.

***

## Authentication Method

Falcon uses the standard HTTP Authorization header.

Include your token in every request:

```
Authorization: Bearer YOUR_API_TOKEN
```

***

## Authentication Errors

If authentication fails, the API will return an error response.

| Code  | Meaning      | Cause                    |
| ----- | ------------ | ------------------------ |
| `401` | Unauthorized | Missing or invalid token |

***

## Security Best Practices

To keep your API key secure:

* Store tokens in **environment variables**
* Never commit tokens to **version control**
* Use **separate tokens for development and production**
* Rotate tokens periodically
