# Vercel API tokens: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/vercel
Last checked: 2026-10-25

Vercel access tokens are created on the Account Tokens page of the dashboard (vercel.com/account/tokens) or with `vercel tokens create`. A token is scoped to your user account and can optionally be limited to one project, and the plaintext value is shown only once. For CI, set it as `VERCEL_TOKEN`.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| Personal access token | — | Yes | Your user account, optionally limited to a single project via `--project` | — |

## How to create a Vercel key

1. Sign in to Vercel and open the **Account Tokens** page (vercel.com/account/tokens).
2. Create a token and give it a name.
3. Copy the token value and store it in a secret manager or CI secret; it is shown only once.
4. Or from the CLI with an existing classic token set as `VERCEL_TOKEN`, run `vercel tokens create "CI deploy"`.

## Limiting what the key can do

Tokens act on your behalf, so they carry your access. To narrow the blast radius, scope a token to a single project with `vercel tokens create "name" --project <project id>`, which makes the token able to act only on that project.

## How to rotate a Vercel key

1. Create a new token (dashboard or `vercel tokens create`).
2. Update `VERCEL_TOKEN` in your CI and local environments.
3. Revoke the old token with `vercel tokens rm <token id>` (find the ID with `vercel tokens ls`).

## How to revoke a Vercel key

1. Run `vercel tokens ls` to find the token ID.
2. Run `vercel tokens rm <token id>` to revoke it, or remove it from the Account Tokens page.

## If the key leaked

1. Revoke the exposed token with `vercel tokens rm <token id>`.
2. Create a replacement, scoped to a single project if possible.
3. Update `VERCEL_TOKEN` wherever it was used.

## Environment variables

- `VERCEL_TOKEN`

## Gotchas

- Vercel recommends `VERCEL_TOKEN` over `--token` in CI because command-line arguments can show in process lists and logs.
- The CLI shows a new token's plaintext only once.
- Team-only or project-only tokens cannot create new tokens.

## Using this key with AI agents (BotPassword)

- `list_credentials`: Lists the credentials this agent is granted and what it may do with each. Never values.
- `run_with`: Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output.
- `cli_login`: Lets git, Docker, the AWS CLI and kubectl log in through bpw's credential helper, so the token is fetched when the tool needs it and not written into its config. The helper hands the value to the tool, so the grant is always disclosing. Other tools use run_with; OAuth device logins are planned.
- `rotate`: Partly built: creates a new key, stores it as pending, verifies it, promotes it, then revokes the old key after a grace period. Today it works for Cloudflare tokens and AWS IAM keys you have set up, and an agent can start it only under a grant with autopilot; other providers cannot be rotated through their API yet.
- `store_secret`: Saves a value the agent already holds as a new vault item.

## FAQ

### Where do I find my Vercel access token?

Create one at vercel.com/account/tokens. The value is shown only once, so create a new token if you lost it.

### How do I use a Vercel token in CI?

Set the `VERCEL_TOKEN` environment variable, or pass `--token`. Vercel recommends the environment variable.

### Can I limit a Vercel token to one project?

Yes. Create it with `vercel tokens create "name" --project <project id>`.

### How do I revoke a Vercel token?

Run `vercel tokens rm <token id>` or remove it from the Account Tokens page.

### Can an AI agent use my Vercel key without seeing it?

Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a `.env` file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with `list_credentials`, `run_with`, `store_secret`, so the agent gets the result and never the value.

## Sources

- https://vercel.com/docs/cli/tokens
- https://vercel.com/docs/cli
- https://vercel.com/docs/agent-resources/vercel-mcp
