amp auth
このページはまだあなたの言語に翻訳されていません。 現在取り組んでいますので、後でもう一度確認してください。
These commands authenticate amp and manage its stored credential profiles. For how profiles, regions, and credential precedence work, go to Authentication.
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.
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 for details.
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.
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.
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.
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.
amp auth use eu
amp auth list
Lists stored profiles. An asterisk (*) marks the active one.
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.
amp auth status
amp auth status --json
amp auth token
Prints the active access token to stdout.
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.
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.
これは役に立ちましたか?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.