Open cmontgomerymt opened 5 years ago
Is it possible you’re using a “project token” rather than a “user token”?
Thank you! That seemed to be it. Will the user token expire after a while?
No, but it seems we should probably at least make this error message better.
As it stands the documented approach simply does not function.
Some talk over here about using different syntax which includes -d 'build_parameters[CIRCLE_JOB]=build'
header. Although similarly does not work as expected and yields errors which make no sense as the settings it says are wrong are set exactly as it describes they should be.
https://discuss.circleci.com/t/api-to-trigger-a-new-build-by-project-preview-fails/24610
Seems nowhere is it documented that a circle-token
has changed from being a "project" key to a "user" key.
Indeed this should be better documented! I'm so glad I found this thread though :D
You're kidding me, it had been reported 2 years ago when I first encounted it. Must be no coders working at CircleCI.
I am trying to use the endpoint specified here: https://circleci.com/docs/api/v1-reference/#new-project-build
But get
"message" : "Permission denied"
error. Not sure why it's denied as I have an API token in CircleCI to use. I also send data
{"branch": "staging"}