V2 API cannot be accessed with project api token

This is related to (write operations not working):

However, even read-only operations are not working.
I created a Project API token (scope: all), and when I try to access a pipeline via

curl "https://circleci.com/api/v2/project/${PROJECT_SLUG}/pipeline/1092?circle-token=${CIRCLE_TOKEN}"

I get this response:

{
  "message" : "Pipeline not found"
}

Changing CIRCLE_TOKEN to my personal token and leaving everything else unchanged, the request works.

:wave: Hello @Pasukaru,

Project-specific tokens are currently not supported on API v2, hence the situation you’re describing.

As you already found out, the workaround is to use personal API tokens.

Hello there! Is there a possible timeline when this support will be added?

Muy bad. Very sad

@yannCI I do not want to use tokens with wide permissions. How do I access the API while limiting the consequences of a compromised token?

This is a huge limitation for v2 API. Countless orbs use this API and require you to provide a PAT…if the person whose token is used leaves the organization, do those jobs just start failing?

It’s been three years since this issue was brought up so it clearly hasn’t been a priority, but I’d like to suggest that it should be :slight_smile: