Skip to content

Authentication

Derek Rushforth edited this page Jul 1, 2019 · 12 revisions

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 part of 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 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 screen or appearing in your shell's history.

Clone this wiki locally