AnsweredAssumed Answered

BadLogin/Password

Question asked by swayam rath on Jul 29, 2015

Hello All,

 

I am not able to call API V2.0 for the qualysguard subscription through my C# code.

 

            var client = new RestClient("https://qualysapi.qualys.com");

            // Set up credentials. 

            client.Authenticator = new HttpBasicAuthenticator("***", "*****");

            var request = new RestRequest("/api/2.0/fo/scan", Method.GET);

            request.AddHeader("X-Requested-With", "RestSharp");

            request.AddParameter("action", "list");

            IRestResponse response = client.Execute(request);

            var xml_result = response.Content;

            Response.Write(xml_result);

 

But when i am using the same username and password to log on to the URL, i am able to log in. the user account has API access.

 

What might be the reason for it?

 

Please help.

Regards,

Swayam

Outcomes