---
title: amp auth
description: "Reference for amp auth signup, login, pat, use, list, status, token, and logout, which authenticate amp and manage its credential profiles."
product: general
lang: en
last_updated: 2026-11-18
token_estimate: 1744
---
# amp auth

These commands authenticate `amp` and manage its stored credential profiles. For how profiles, regions, and credential precedence work, go to [Authentication](https://amplitude.com/docs/developers/cli/authentication).

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## `amp auth signup`

Creates an account and saves credentials when available. If authorization is required, an interactive terminal shows the verification URL and waits for authorization; with --non-interactive or without a terminal, it returns the next step. Exit 0 can indicate requires\_auth; inspect status to distinguish it from authorized. By utilizing this command you agree to the Terms of Service (https://amplitude.com/terms) and acknowledge the Privacy Policy (https://amplitude.com/privacy) applies.

```bash
amp auth signup --non-interactive --email alex@example.com --full-name "Alex Morgan" --region us --accept-tos --json
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--non-interactive` | boolean | No | Do not open a browser or wait for authorization. |
| `--email` | string | Yes | Email address for signup. |
| `--full-name` | string | No | Full name; supply it to complete eligible immediate signup. |
| `--accept-tos` | boolean | No | Agree to Terms of Service (https://amplitude.com/terms) and acknowledge Privacy Policy (https://amplitude.com/privacy). |
| `--region` | string: `us`, `eu` | Yes | Target region, required for signup. |
| `--profile` | string | No | Profile name; omit to use the active profile, or default when none is active. |
| `--force` | boolean | No | Permit changing an existing profile endpoint on successful authentication. Credentials remain until saved. |

## `amp auth login`

Authenticates through the interactive OAuth device flow and saves the result as a profile. Pass `--region us` or `--region eu` when you create a profile. Omit `--profile` to use the implicit `default` profile.

A bare `amp auth login`, with no `--profile` or `--region`, re-authenticates the active profile against its recorded region. The CLI also accepts the development-oriented `--env` and `--base-url` options but omits them from standard help. Go to [Configuration](https://amplitude.com/docs/developers/cli/configuration#base-url) for details.

```bash
amp auth login --region us
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--region` | string: `us`, `eu` | Yes | Target region (us|eu); sets the base URL. |
| `--profile` | string | No | Profile name; omit to use the implicit default profile. |
| `--force` | boolean | No | Overwrite the profile when it already targets a different region/base URL, skipping the confirm prompt. |

## `amp auth login start`

Begins OAuth device authorization: returns a verification URL, user code, and expiry, and records a pending authorization. The authorization is completed out of band by confirming the code; `amp auth login poll` returns the resulting credential.

Use it from an agent or script. It records the pending authorization locally but doesn't expose the device code. The response includes the `login poll` command to run after the user approves the request.

```bash
amp auth login start --region us --json
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--region` | string: `us`, `eu` | Yes | Target region (us|eu). |
| `--profile` | string | No | Profile name; defaults to the implicit default profile. |
| `--force` | boolean | No | Overwrite the profile when it already targets a different region/base URL (the retarget is refused without it). |

## `amp auth login poll`

Completes the device authorization returned by `amp auth login start` or `amp auth signup`: returns the credential once the code is confirmed, or reports that authorization is still pending or the code has expired. Each call blocks up to ~25s (`--timeout <seconds>`, or `--timeout 0` for a single check).

A pending authorization returns `status: "pending"` and exit code `75`. An approved authorization saves the credential and returns `status: "authorized"`. Expired and failed authorizations return error envelopes.

```bash
amp auth login poll --json
amp auth login poll --timeout 0 --json
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--profile` | string | No | Profile being authorized; defaults to the implicit default. |
| `--timeout` | integer | No | Max seconds to block this call. 0 = one check and return. |

## `amp auth pat`

Saves a Personal Access Token as a profile instead of running the device flow. `--with-token` is mandatory: it makes the supply-an-existing-PAT path explicit. It reads the PAT from stdin when piped, or shows a masked prompt at a terminal.

```bash
echo "$PAT" | amp auth pat --with-token --profile ci --region us
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--with-token` | boolean | Yes | Read the PAT from stdin (piped) or a masked prompt (TTY). |
| `--region` | string: `us`, `eu` | Yes | Target region (us|eu). |
| `--profile` | string | No | Profile name; defaults to the implicit default profile. |
| `--force` | boolean | No | Overwrite the profile when it already targets a different region/base URL (the retarget is refused without it). |

## `amp auth use <profile>`

Switches the active profile without re-authenticating.

```bash
amp auth use eu
```

## `amp auth list`

Lists stored profiles. An asterisk (`*`) marks the active one.

```bash
amp auth list
amp auth list --json
```

## `amp auth status`

Reports the active credential's type, base URL, and expiry, and announces when `AMP_TOKEN` is overriding profile selection.

```bash
amp auth status
amp auth status --json
```

## `amp auth token`

Prints the active access token to stdout.

```bash
TOKEN=$(amp auth token)
```

## `amp logout`

Removes one stored profile, or every stored profile. Unlike the other commands on this page, `logout` is a top-level command, not a subcommand of `amp auth`.

At a terminal, `amp logout --all` asks for confirmation. In a script or other non-interactive process, pass `--yes` or the command stops without deleting profiles. Logout also cancels a pending device login for the selected profile.

```bash
amp logout --profile staging   # remove one profile
amp logout --all               # remove every profile
amp logout --all --yes         # remove every profile without a prompt
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--profile` | string | No | Profile to remove; defaults to the active one. |
| `--all` | boolean | No | Remove every stored profile. |

For credential precedence (`--token` > `AMP_TOKEN` > `--profile` > `AMP_PROFILE` > the active profile) and the scopes each command family needs, go to [Authentication](https://amplitude.com/docs/developers/cli/authentication).

