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'
Comments
Please sign in to leave a comment.