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 Settings
  2. Click on Access on the left side menu
  3. Click on Generate Token button
  4. Type in a token name and click Generate
  5. Use this token in your API requests as stated below.

You can supply the token as an Authorization header like below:

curl --location --request GET 'https://codecov.io/api/v2/{{ SERVICE NAME }}/{{ ORGANIZATION NAME }}/users' \
     --header 'Authorization: bearer {{ ACCESS TOKEN }}'

💡

Note

If you notice that data returned by the endpoints is out of date, you might have to login to Codecov. This re-triggers a synch with the code provider which should result in data being up-to-date once again.