403 Forbidden error response when trying to upload Test Results through Rest API

Symptoms:

REST API gives error response from Jira in the below format:

Authentication-Denied-Reason â†’CAPTCHA_CHALLENGE; loginurl=http://abc.com/login.jspX-Content-Type-Options â†’nosniffX-Frame-Options â†’SAMEORIGINX-Seraph-LoginReason â†’AUTHENTICATION_DENIEDX-XSS-Protection â†’1; mode=block

Root Cause:

The authentication request from your application is denied by your Jira instance due to 3 incorrect login attempts using the user ID enabling captcha challenge.


Solution:

Login into your Jira instance using the same credentials and complete the Captcha challenge to login and then retry importing the results using the API.