Skip to main content

Obtain your credentials

The Email API client 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 under API Credentials.
from_env() returns Err(PauboxError::EnvVar(...)) immediately if either variable is missing or empty.

Option 2: Direct constructor

Option 3: Builder (with custom timeout or base URL)

Use .base_url(url) in tests to point at a mock server. The SDK sets the Authorization header automatically on every request:

Forms client

FormsClient requires no credentials:
If you already have a PauboxClient, reuse its HTTP connection pool:

Security notes

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