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

# Authentication

> Configure your Paubox API credentials for the Python SDK.

## Obtain your credentials

The Email API client requires two values:

* **API key**: a secret token that authenticates your requests
* **API host**: the full endpoint URL for your account, which includes your username

Both are available in the [Paubox dashboard](https://next.paubox.com) under **API Credentials**.

## Environment variables (recommended)

Set these in your shell or a `.env` file loaded by your application:

```bash theme={null}
PAUBOX_API_KEY=YOUR_API_KEY
PAUBOX_HOST=https://api.paubox.net/v1/YOUR_USERNAME
```

Replace `YOUR_USERNAME` with your Paubox API endpoint username. The SDK reads these automatically — no constructor arguments needed:

```python theme={null}
from paubox import PauboxApiClient

client = PauboxApiClient()
```

## Constructor parameters

Pass credentials directly if you prefer not to use environment variables:

```python theme={null}
client = PauboxApiClient(
    api_key = 'YOUR_API_KEY',
    host    = 'https://api.paubox.net/v1/YOUR_USERNAME'
)
```

The SDK sets the `Authorization` header automatically on every request:

```
Authorization: Token token=YOUR_API_KEY
```

## Forms client

`PauboxFormsClient` requires no credentials:

```python theme={null}
from paubox import PauboxFormsClient

forms_client = PauboxFormsClient()
```

## Security notes

* Never hard-code credentials in source files.
* The SDK does not log API keys or request bodies.
