Utilizing 'Basic' authorization in CircleCI API calls

The examples provided in our v2 API docs note the ability to use Basic authorization for the API calls:

https://circleci.com/docs/api/v2/#section/Authentication/basic_auth

With the above in mind, the Basic authorization header requires that you base64 encode your API token before passing it into the call. I.e.:

echo -n <personal-api-token> | base64

Then take the output of that base64 encoding and pass it into your curl -- as an example:

curl --request GET \
  --url https://circleci.com/api/v2/workflow/<workflow-id-here>/job \
  --header 'authorization: Basic <base64-encoded-token-here>'
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.