Using rest API with user token

Using SonarQube

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

What is wrong?

commands I used:

curl -v -L -u userid:password ==>> ok

curl -v -L ==>> notok
I get a 401

hello, have you tried what is recommended here ?

# note that the colon after the token is required in curl to set an empty password 

Hallo Pierre,

Thanks for your quick reply.

That option also works well.

But I have to use the token=xxx version, if that is possible within the SonarQube API call.

I have to validate within an excel module to our SonarQube instance, and at this time I only can provide the module with an URL

I’m sorry, but it’s not possible to use token as parameter of the web services.

That’s too bad. But thanks for your quick reply.
I wil look for an other option.