Not able to connect to API

*** which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)**
9.9LTS

*** how is SonarQube deployed: zip, Docker, Helm**
Self-hosted

*** what are you trying to achieve**
I need to make some automations for SonarQube to pull data about project usage on monthly basis.

*** what have you tried so far to achieve this**
I tried to generate user token in SonarQube instance as I am an admin. Added Authorization header with “Bearer [token]”, but I am getting 401.

postman call goes here “https://myinstancename.azurewebsites.net/api/projects/search

Much appreciated!

Welcome :slight_smile:

you need to use basic authentication with sonarusertoken:
means the token plus separator ‘:’ and a blank password.

Gilbert

1 Like

That did work out. Thanks a lot buddy :v:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.