> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firmium.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate Firmium API requests with a Bearer token

# Authentication

Firmium uses Bearer tokens. Send a valid token in the `Authorization` header on every API request.

## Setup

1. Create an API key (Bearer token) in the Firmium dashboard.
2. Attach it to your requests.

## Header

```bash theme={null}
Authorization: Bearer <your_token>
```

## Token format

* The token is an opaque string issued by Firmium.
* Treat it like a password — store it securely and do not share it.

## Example request

```bash theme={null}
curl -X GET https://www.firmium.de/api/v1/companies \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json"
```

## Errors

### 401 Unauthorized

```json theme={null}
{
  "error": "Ungültiges oder abgelaufenes Token",
  "code": "unauthorized"
}
```

### 403 Forbidden

```json theme={null}
{
  "error": "Unzureichende Berechtigungen",
  "code": "forbidden"
}
```

## Best practices

1. **Storage:** Keep tokens out of git.
2. **Rotation:** Rotate and revoke unused tokens.
3. **Errors:** Handle 401/403 explicitly.
4. **Rate limits:** Back off when you hit [rate limits](/rate-limits).

## Next steps

* [Rate limits](/rate-limits)
* [Error codes](/error-codes)
