Authentication
Authenticate server-side requests using an API key or an OAuth2 bearer token.
The Easymailing API accepts either an API key or an OAuth2 bearer token. Choose the method that matches your integration.
API key
For integrations with your own account, send the API key in the X-Auth-Token
header. You can create a key in the Easymailing control panel under
Config > API Keys.
curl 'https://api.easymailing.com/audiences' \
--header 'Accept: application/ld+json' \
--header 'X-Auth-Token: YOUR_API_KEY'Keep the API key on your server, for example in an environment variable. Never include it in client-side JavaScript or a public repository.
OAuth2 bearer token
Third-party applications can use OAuth2 to connect on behalf of a user. Once
your application has obtained an access token through the authorization flow,
send it in the Authorization header with the Bearer prefix.
curl 'https://api.easymailing.com/audiences' \
--header 'Accept: application/ld+json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'Using an SDK
The Node.js / TypeScript and PHP guides show how to configure an API key with the official clients.