Error 403 when listing projects through API call

Hi. Previously, I created an access token with full access control. When I make a request to the GET Retrieve a list of projects endpoint and I receive this response:

{
  "error": {
    "code": "forbidden",
    "message": "Not authorized: Trying to access resource under scope "random-scope". You must re-authenticate to this scope or use a token with access to this scope.",
    "saml": true,
    "teamId": null,
    "scope": "random-scope",
    "enforced": false
  }
}

The Curl command I execute is the following:

curl -X GET "https://api.vercel.com/v9/projects" \
-H "Authorization: Bearer XXXXXXXXXXXXXXXX" -H "Content-Type: application/json"

This is the URL I used to structure my request: Projects

Hey @nahuel-98. It sounds like you’re using the retrieve a list of projects endpoint. If you already have the appropriate access token, you might just need to add the slug or teamId query parameter to indicate the scope. Please give that a try and let me know if that solves it for you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.