> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Authentication commands

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/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/reference/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

**`--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`.

---

**`--verbose`**

Shows detailed error information for the authentication attempt.

---

### 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
```