-
Notifications
You must be signed in to change notification settings - Fork 11
Authentication
Each command requires an account or server token depending on the level of access required.
To execute commands without needing to manually enter your token, you may specify environment variables in your .bashrc
or as environment variables within your CI config:
export POSTMARK_ACCOUNT_TOKEN='<account token>'
export POSTMARK_SERVER_TOKEN='<server token>'
The benefit of the above is that these values will not be echoed in your console logs, and you will be able to run cli commands "non-interactively" (as is necessary for most CI/CD setups).
If the necessary token is not supplied as an environment variable, you will be prompted for your the token when running a postmark cli command:
We highly recommend using environment variables with postmark cli to protect your token from "leaking" into logs or accidentally being displayed directly on/appearing in your shell's history.
Postmark CLI - manage templates, send email and more