***
title: Authentication commands
approved: 2026-03-16T00:00:00.000Z
topictype: reference
slug: docs/postman-cli/postman-cli-auth
max-toc-depth: 2
----------------
You can use the Postman CLI to sign in and out of Postman with the [`login`](#postman-login) and [`logout`](#postman-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](/docs/getting-started/installation/installation-and-updates/#use-postman-behind-a-firewall) 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](/docs/administration/enterprise/about-eu-data-residency/), 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](/docs/developer/postman-api/authentication/#generate-a-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
```bash
postman login [options]
```
### Options
Authenticate the user with the given API key.
Specify that your instance of Postman is hosted in the EU region. Accepts `eu`.
### Examples
```bash
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
```bash
postman logout
```
### Examples
```bash
postman logout
```