Vercel
Overview¶
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¶
Provide your API token (and optional team ID) when prompted.
Option 2: Environment variables¶
Add to your .env:
| Variable | Default | Description |
|---|---|---|
VERCEL_API_TOKEN |
— | Required. Vercel API token |
VERCEL_TEAM_ID |
— | Team 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"
}
}
]
}
Credentials¶
- In Vercel, go to Account Settings → Tokens
- Click Create Token
- Give it a name (for example
opensre) and set the scope to Full Account or a specific team - Copy the token
Info
For team accounts, find your Team ID in Team Settings → General → Team ID. Set VERCEL_TEAM_ID (or store team_id) so OpenSRE can list team projects.
OpenSRE calls the Vercel API at https://api.vercel.com.
Tools¶
| Tool | What it does |
|---|---|
vercel_deployment_status |
Check recent deployment status for projects OpenSRE can see |
vercel_deployment_logs |
Retrieve runtime / deployment logs to surface serverless errors |
Verify¶
Expected output:
Inside the REPL: /integrations verify vercel or /verify vercel.
Troubleshooting¶
| Symptom | Fix |
|---|---|
| 401 Unauthorized | Check that the API token is valid and not expired |
| 403 Forbidden | The token may not have access to the team — check token scope |
| Projects not found | Ensure VERCEL_TEAM_ID is set if using a team account |
Security¶
- 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.
Markdown source: View on AtomGit·Content from the open-source project op/opensre