Authentication commands

View as Markdown

You can use the Postman CLI to sign in and out of Postman with the login and logout commands.

Any local operations work without a login requirement. Commands that interact with the Postman cloud require you to be signed in.

If you’re using the Postman CLI from a network with outbound restrictions, you must allowlist specific domains to connect to Postman.

postman login

The login command prompts you to securely sign in and authenticate from the browser.

If you purchased a Postman EU Data Residency plan, the login command also requires the --region option. Use this option with the argument eu to specify that your instance of Postman is hosted in the EU region.

You can also use the --with-api-key option to authenticate using your Postman API key. This method is recommended when using the Postman CLI from your CI/CD pipeline, but you can also use this method from your local machine.

You remain signed in until you use the logout command or your Postman credentials or API key expire.

Usage

$postman login [options]

Options

--with-api-key <api-key>

Authenticate the user with the given API key.

--region <region>

Specify that your instance of Postman is hosted in the EU region. Accepts eu.

Examples

$postman login
$
$postman login --with-api-key ABCD-1234-1234-1234-1234-1234
$
$postman login --with-api-key ABCD-1234-1234-1234-1234-1234 --region eu

postman logout

The logout command signs you out of Postman and deletes the stored API key.

Usage

$postman logout

Examples

$postman logout