Skip to main content
OpenSRE queries Vercel to retrieve deployment status and runtime logs — helping identify whether a recent deployment caused an incident or surface errors from serverless function executions.

Prerequisites

  • Vercel account with project access
  • Vercel API token

Setup

Option 1: Interactive CLI

opensre integrations setup
Select Vercel when prompted and provide your API token.

Option 2: Environment variables

Add to your .env:
VERCEL_API_TOKEN=your-vercel-api-token
VERCEL_TEAM_ID=team_xxxxxxxxx   # optional, for team accounts
VariableDefaultDescription
VERCEL_API_TOKENRequired. Vercel API token
VERCEL_TEAM_IDTeam ID for team/organization accounts

Option 3: Persistent store

{
  "version": 1,
  "integrations": [
    {
      "id": "vercel-prod",
      "service": "vercel",
      "status": "active",
      "credentials": {
        "api_token": "your-vercel-api-token",
        "team_id": "team_xxxxxxxxx"
      }
    }
  ]
}

Creating a Vercel API token

  1. In Vercel, go to Account SettingsTokens
  2. Click Create Token
  3. Give it a name (e.g., opensre) and set the scope to Full Account or a specific team
  4. Copy the token
For team accounts, find your Team ID in Team SettingsGeneralTeam ID.

Verify

opensre integrations verify --service vercel
Expected output:
Service: vercel
Status: passed
Detail: Connected to Vercel API and listed 5 project(s)

Troubleshooting

SymptomFix
401 UnauthorizedCheck that the API token is valid and not expired
403 ForbiddenThe token may not have access to the team — check token scope
Projects not foundEnsure VERCEL_TEAM_ID is set if using a team account

Security best practices

  • Create a dedicated read-only token for OpenSRE — do not reuse deployment tokens.
  • Store the token in .env, not in source code.
  • Rotate tokens periodically.