> ## 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 Java SDK.

## Obtain your credentials

The Email API service requires two credentials:

* **API key**: a secret token that authenticates your requests
* **Username**: your Paubox API endpoint username (not your login email)

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

## Create config.properties

Create a `config.properties` file in your project directory:

```properties theme={null}
APIKEY=YOUR_API_KEY
APIUSER=YOUR_USERNAME
```

## Load credentials at startup

Call `ConfigurationManager.getProperties` once before creating an `EmailService`. Pass the file path relative to your working directory or as an absolute path:

```java theme={null}
import com.paubox.config.ConfigurationManager;

ConfigurationManager.getProperties("config.properties");
```

The SDK reads `APIKEY` and `APIUSER` from the loaded properties and sets the `Authorization` header automatically on every request:

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

## FormsService

`FormsService` requires no credentials and no config loading:

```java theme={null}
import com.paubox.service.FormsService;

FormsService formsService = new FormsService();
```

## Security notes

* Do not commit `config.properties` to source control. Add it to `.gitignore`.
* In production environments, consider reading credentials from system environment variables and writing them to the properties file at startup rather than storing them statically on disk.
