Obtain your API key
The Email API client requires one credential:- API key: a secret token that authenticates your requests
Create a config.cfg file
Create aconfig.cfg file in your project directory:
API_KEY is not recognized. The SDK reads this file automatically via Config::General when you instantiate the client; no constructor arguments are needed:
config.cfg is read from the current working directory. The constructor dies immediately if apiKey is missing from the config file, so credential errors are caught at startup.
The SDK sets the Authorization header on every request:
Forms client
getForm and submitForm are public and need no credentials:
Paubox_Forms_SDK methods need an API key with the forms scope, sent as Authorization: Bearer YOUR_API_KEY. Pass it to the constructor, or set FORMS_API_KEY in config.cfg:
Security notes
- Do not commit
config.cfgto source control. Add it to your.gitignore. - The SDK does not expose credentials in error messages or logs.