AnsweredAssumed Answered

having some troubles making API v2 calls with

Question asked by Nicolas Weydmann on Jan 7, 2013
Latest reply on Jan 23, 2013 by Eric Perraudeau



I'm currently new to Qualys Api user, and i'm trying to make some API v2 calls with code.


I'm using libcurl and i'm stuck going trough session authentication. My code is as described bellow :


Dim easy As Easy

        easy = New Easy()




        easy.SetOpt(CURLoption.CURLOPT_PROXY, proxy)

        easy.SetOpt(CURLoption.CURLOPT_PROXYPORT, proxyport)

        easy.SetOpt(CURLoption.CURLOPT_PROXYUSERPWD, authlogin & ":" & authpass)



        easy.SetOpt(CURLoption.CURLOPT_URL, url) ' Set server url to authenticate to

        easy.SetOpt(CURLoption.CURLOPT_HEADER, 1)

        easy.SetOpt(CURLoption.CURLOPT_HTTPHEADER, "X-Requested-With: Curl")

        easy.SetOpt(CURLoption.CURLOPT_USERPWD, login & ":" & pass)

        easy.SetOpt(CURLoption.CURLOPT_POST, True) ' Indicate i'm posting info

        easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, "action=login")

        easy.SetOpt(CURLoption.CURLOPT_SSL_VERIFYPEER, False) 'disable verifypeer


        result = easy.Perform()

        Response = result.ToString


I get an error code 56 when i'm performing this ("Failure when receiving data from the peer"). Any ideas on what's wrong with this ?


Thanks for your replies,