Cloud and hosting

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

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.

Vercel key types

TypePrefixSecret?ScopeExpiry
Personal access token
The CLI prints the plaintext value once. Creating tokens with the CLI needs an existing classic personal access token with account-level scope; vercel login sessions cannot mint tokens.
—YesYour 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".

Open Vercel's key settings

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 your Vercel 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 and CLI

Vercel's SDKs and docs read the key from VERCEL_TOKEN.

Vercel CLI (vercel): vercel login for interactive use; set VERCEL_TOKEN or pass --token in CI (the flag wins if both are set)

Things that catch people out

  • 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 your Vercel key with AI agents

A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.

BotPassword works this way. For a Vercel key, these intents fit:

IntentWhat BotPassword does
list_credentialsLists the credentials this agent is granted and what it may do with each. Never values.
run_withRuns 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_loginLets 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.
rotatePartly 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_secretSaves a value the agent already holds as a new vault item.

Vercel also publishes its own MCP server. Whatever server the agent uses, keep the credential it authenticates with out of the agent's context.

Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents

Frequently asked questions

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.

Stop pasting Vercel keys into agents

BotPassword is in early access. Request an invite and we'll email you when your spot opens.