Credentials

Getting The Keys

We've seen how to initialize the configurations with the keys. Now, let's see how to obtain these keys on Vercel. The required keys are VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID, which can be defined in your environment variables or wherever you manage them privately.

.env
VERCEL_TOKEN=your-vercel-token
VERCEL_TEAM_ID=your-vercel-team-id
VERCEL_PROJECT_ID=your-vercel-project-id

Vercel Token

This token is account-based and can be assigned to one of the teams. With this, Vercel will authorize the SDK to access and perform actions on behalf of your account. To obtain it, visit Vercel Tokens (opens in a new tab), enter your token name, team scope, expiration date, and click create.

Never expiring tokens are not recommended but not restricted. It's always good to have a token that expires after a certain period and rotate it in a form.


Vercel Team Id

This is the ID of your team. It's used when you need to perform actions on behalf of your team projects. To obtain the token, click the link below and replace {unique_team_slug} with your team's name. When the dashboard settings load, scroll down to the Team ID section where you can copy it.

https://vercel.com/{unique_team_slug}/~/settings

Vercel Project Id

This is the ID of your project. It's used when you need to perform detailed actions on that project. To obtain the token, click the link below and replace {unique_team_slug} and {project_slug} with your team's name and project slug. When the dashboard settings load, scroll down to the General section where you can copy it.

https://vercel.com/{unique_team_slug}/{project_slug}/settings/general