Skip to main content

Vercel Access Token

To authenticate with the Vercel API, you need a Personal Access Token or a Team Access Token.
1

Go to Vercel Settings

Log in to your Vercel dashboard and navigate to Settings > Tokens.
2

Create a new token

Click the Create Token button. Give it a descriptive name (e.g., “Corsair Integration”).
3

Select Scope

Choose the appropriate scope for your token. You can select Full Account for access to all personal projects, or select a Specific Team if you want to limit access to a team’s resources.
4

Copy the token

Copy the generated token immediately, as you won’t be able to see it again.

Storing the token

Once you have your token, store it using the Corsair CLI:
pnpm corsair setup --plugin=vercel api_key=your_vercel_token

Securing Webhooks (Optional)

If you configure Vercel webhooks to point to your Corsair endpoint, it is highly recommended to set a Webhook Secret to verify incoming payloads.
  1. When you create a webhook in Vercel, it will provide a Secret.
  2. Pass this secret directly when initializing the Vercel plugin:
corsair.ts
import { vercel } from '@corsair-dev/vercel';

export const corsair = createCorsair({
    plugins: [
        vercel({
            webhookSecret: process.env.VERCEL_WEBHOOK_SECRET
        })
    ],
});