api-preview-docs icon indicating copy to clipboard operation
api-preview-docs copied to clipboard

"message" : "Project not found"

Open bmcgair opened this issue 6 years ago • 2 comments
trafficstars

following the simple example you give on the front page.

curl -u ${CIRCLECI_TOKEN}: -X POST --header "Content-Type: application/json" -d '{ "parameters": { "param1": "foo", "param2": "find-me" } }' https://circleci.com/api/v2/project/gh/myorg/myproj/pipeline

"message" : "Project not found"

The project is found just fine by the 1.1 api This doesn't work either:

curl -u ${CIRCLECI_TOKEN} https://circleci.com/api/v2/me Enter host password for user 'mytokenhere':

I try it like this and I get the spew:

curl -u ${CIRCLECI_TOKEN}: -X POST --header "Content-Type: application/json" -d '{ "parameters": { "param1": "foo", "param2": "find-me" } }' https://circleci.com/api/v2/project/myorg/myproj/pipeline

Continuous Integration and Deployment

bmcgair avatar Jul 30 '19 23:07 bmcgair

Considering that the project does exist (confirmed by the successful API v1.1 request), this error message suggests that you're using project API tokens, which are not supported on CircleCI API v2, as opposed to personal API tokens.

yaningo avatar Apr 08 '21 18:04 yaningo

For whoever is also trying to hit the CircleCi API v2 with a project API token... As @yaningo mentioned, you will need to use a personal api token instead. Would love the ability for project level api tokens as that would be more secure and give the ability for more long-term use cases.

austinflowspace avatar May 31 '23 16:05 austinflowspace