I’m trying to get, add and delete environment variables with the Circleci API with curl.
I’ve created a personal API token and made sure that I’ve the correct role in Github (owner).
The response for
curl -u <token> https://circleci.com/api/v1.1/me
is working fine.
The following is also working fine
curl -u <token> https://circleci.com/api/v1.1/project/github/username/projectname
I have no trouble to list all projects.
But when I try to do anything (get, add, delete) with environment variables I get the response ‘Permission denied’.
For example when calling
curl -u <token> https://circleci.com/api/v1.1/project/github/username/projectname/envvar
curl -u <token> https://circleci.com/api/v1.1/project/github/username/projectname/envvar/nameofvar
I’m having a hard time figuring out what I’m doing wrong. I can edit the env vars in the CircleCI ui so it’s weird I can’t do it here.