Using 'Basic' Authentication in CircleCI API Calls

Basic Authentication

You can use Basic Authentication for our CircleCI V2 APIs:

Please note that this would require you to:

  • set the username value to your CircleCI user API token, and
  • (optional) set the password as empty



The following examples use `curl` , but you can adjust according to your HTTP library.

curl -X GET -u "${CIRCLE_TOKEN}:"


BASIC_AUTH=$(echo -n "${CIRCLE_TOKEN}:" | base64)

curl -H "Authorization: Basic ${BASIC_AUTH}"


# example without setting password for Basic Authentication
# Note the `:` is not set here
curl -H "Authorization: Basic $(echo -n $CIRCLE_TOKEN | base64)"
Was this article helpful?
10 out of 16 found this helpful



Article is closed for comments.