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

# Java SDK authentication

> Configure Paubox API credentials for the Java SDK with a config.properties file loaded at startup, plus FormsService setup and key security notes.

## Obtain your API key

The Email API service requires one credential:

* **API key**: a secret token that authenticates your requests

It is 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
```

## 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` 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.