Empty Vercel Project ID from API when Installing Dashboard Widget
I've definitely seen this issue come up before with the Vercel Dashboard Widget plugin when dealing with team projects!
The key issue is that when your Vercel project lives under a Team account (not your personal account), you need to provide the teamId parameter when making API calls to Vercel. Without it, the API defaults to looking in your personal account, which is why you're getting empty results.
Finding Your Vercel Team ID
Option 1: Via Vercel Dashboard (Easiest)
- Go to your Vercel dashboard
- Navigate to Settings β General (make sure you're viewing your team's settings, not a personal project)
- Look for the Team ID in the settings page
Option 2: Via Vercel API You can use the List Teams endpoint to get all teams associated with your account:
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://api.vercel.com/v2/teamsThis will return a list of teams with their IDs. Look for the team that owns your project.
Option 3: Via Vercel CLI
vercel teams listGetting the Project ID for Team Projects
Once you have your Team ID, you need to include it when fetching projects:
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.vercel.com/v9/projects?teamId=YOUR_TEAM_ID"Without the teamId parameter, the API only returns projects from your personal account.
Configuring the Sanity Plugin
When you set up the Vercel Dashboard Widget in your Sanity dashboard, you'll need to provide both:
- Vercel Project ID (from the API call above or from Project β Settings β General in Vercel)
- Vercel Team ID (from the steps above)
The plugin README specifically mentions this in its configuration: "If your project is assigned to a team account, you must provide both team and project IDs."
Important Note on Token Permissions
Make sure your Vercel access token has the appropriate permissions for the team. If you're listed as an owner but the token was created before you joined the team or doesn't have team scope, it might not work properly. You may need to regenerate your token from Account β Settings β Tokens while ensuring it has access to your team's resources.
Hope this helps! Let me know if you're still having issues after adding the Team ID.
Sanity β Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.