To access Codecov's API as an authenticated user please create an access token in Codecov. To create an access token please follow these directions:

  1. Navigate to your personal (not org) account page by clicking on your avatar (top right corner) then Account
  2. Click on Access tab
  3. Click on Create in the API Tokens panel
  4. Type in a token name and click Generate
  5. Use this token in your API requests as stated below.

You can pass the token in the query params or in the request headers as seen in the two examples below.

Using the query string (not as secure, due to visible token)

GET https://codecov.io/api/pub/{gh|gl|bb}/{owner}/{repo}/settings?access_token=<token>

Using the headers (recomended method)

curl -X GET https://codecov.io/api/pub/{gh|gl|bb}/{owner}/{repo}/settings \
     -H 'Authorization: {token}'