AnsweredAssumed Answered

Session login error

Question asked by Changyu Feng on Jun 26, 2019
Latest reply on Jun 27, 2019 by Busby

I can request by http authentication and get list of hosts by this.

curl -H "X-Requested-With: Curl Sample" -u "username:passwd" "https://qualysapi.qualys.com/api/2.0/fo/asset/host/?action=list"

 

However, i can't login via session authentication using the same credentials.

curl -H "X-Requested-With: Curl Sample" -d "action=login&username=username&password=passwd" "https://qualysapi.qualys.com/api/2.0/fo/session/"

 

Error messages:

< HTTP/1.1 401 Unauthorized
< Date: Wed, 26 Jun 2019 17:00:16 GMT
< Server: Qualys

 

<CODE>2000</CODE>
    <TEXT>Bad Login/Password</TEXT>

 

I am sure the account I was using have API permission. Please help me with this.

Outcomes