Generate Authentication Token
The following sample illustrates generating JWT tokens required for accessing Qualys APIs.
API Request
curl --location '<<token generation url>>' JWT Token
--header 'Content-Type: application/x-www-form-urlencoded' JWT Token
--data-urlencode 'grant_type=password' JWT Token
--data-urlencode 'username=<<Qualys_okta_sandbox_user_id>>' JWT Token
--data-urlencode 'password=<<Qualys_okta_sandbox_password>>' \
--data-urlencode 'client_id=<<Qualys_okta_sandbox_application_client_id>>' \
--data-urlencode 'scope=openid profile'
The token generation URL may vary based on the IdP application you are using.The sample below illustrates the request and response for Okta.
API Response
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "<JWT token value",
"scope": "profile openid",
"id_token": "<JWT token value>"
}