Why am I getting the log in error on calling CircleCI APIs?

Overview

This article provides how to troubleshoot an issue on calling the CircleCI APIs. When you get the following error message, you might need to check the header.

"message" : "You must log in first."

 

Check which authorization method used for the request

There are various ways to authorize the API request (please refer to the document for details):

  • api_key_header
  • basic_auth
  • api_key_query

Please check which method you are using for calling the API request and whether it following a correct syntax. For instance, if you want to use a personal API token, a request should look like this:

curl --request GET \
  --url 'https://circleci.com/api/v2/pipeline?org-slug=github/org_name&mine=false' \
  --header 'Circle-Token: CCIPAT_xxxxxx'

 

Additional Resources:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.