I want to get the information from the projects index.
If I use the curl command with userid:ww I get the right information
If I use the same curl command except using a token, I get the 401 Unauthorized
# note that the colon after the token is required in curl to set an empty password
curl -u THIS_IS_MY_TOKEN: https://sonarqube.com/api/user_tokens/search
I’m also facing issue with API.
I tried using the token but it doesn’t work and I’m getting 401 error.
curl -v -D- -u myTokenHere: -X GET -H “Content-Type: application/json” https://sonar.url.net/api/editions/show_license
but if I use my username and password the same works. Is there any limitation to the use of token.
curl -v -D- -u username:password -X GET -H “Content-Type: application/json” https://sonar.url.net/api/editions/show_license