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/"
< HTTP/1.1 401 Unauthorized
< Date: Wed, 26 Jun 2019 17:00:16 GMT
< Server: Qualys
I am sure the account I was using have API permission. Please help me with this.