Obtain your API key
The Email API service requires one credential:- API key: a secret token that authenticates your requests
Create config.properties
Create aconfig.properties file in your project directory:
Load credentials at startup
CallConfigurationManager.getProperties once before creating an EmailService. Pass the file path relative to your working directory or as an absolute path:
APIKEY from the loaded properties and sets the Authorization header automatically on every request:
FormsService
FormsService requires no credentials and no config loading:
Security notes
- Do not commit
config.propertiesto 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.