how to resolve the authentication issue while getting data with python request ?
I am making an authentication request with Python's requests package, to fetch Test Plan details and further processing, from MY_PROJECT. Right in the beginning of it I am facing the authorization issue, despite getting a 200 status. Details : 1. URL = https://MY_PROJECT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/ For the above request, I am getting notably these texts : 1. <Javascript is either disabled or not available in your Browser> ... 2. <net.jazz.ajax.ui.PlatformUI.createAndRunWorkbench("net.jazz.web.app.authrequired")> Requesting if there is someway in which I can solve this issue ? pasting a sample output for reference Output - <!DOCTYPE html> |
One answer
Ralph Schoon (63.3k●3●36●46)
| answered Apr 11, 7:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 11, 8:44 a.m. Basically, you are not authenticated and you need a session.
Comments
Ghati R
commented Apr 11, 9:16 a.m.
Thank you Ralph for the response ! I 'll check out that link. Hi Ralph, I followed the NativeClientAuthentication link and the authentication steps defined there. I see that my schema is " FORM Challenge", as I get the GET status of < 200 > for the initial request.
Ralph Schoon
commented Apr 11, 3:28 p.m.
| edited Apr 11, 4:29 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am getting tired of these answers "I do it right, but the response is unexpected".
The header [
X-com-ibm-team-repository-web-auth-msg ]
= authrequired
indicates you are not authenticated. The header says "authentication required". Status 302 and 200 indicate a possible form authentication is needed. You do not perform a form authentication either, for all I can tell. The URI is a different one the request body also The response data also shows unauthenticated. Also, you need a session.
My code works, look what it does and take it or leave it. I have used it for a long time now. I am pretty sure I know how this works. I will not continue discussing this here. To be sure, you can also use Firefox, install RESTClient. Open the target application in the browser and authenticate. Then GET your link. If that works you know you did your authentication wrong. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.