401 Error connecting to server from Python REST API
![]()
I have a friendship link in our ETM with another cloud server's RM project. The link can connect test cases with the requirements. It is working as of now in our ETM.
I am trying to use Python REST API to get the data from either server with also the link. I am having troubles connecting to the server as I'm not sure which authentication needed. I'm not familiar with REST API and keep getting the 401 error. I have used different authentication types including basic, form, oscl, and bearer but all returns the same 401 response. I have read from several forums, jazz.net and also tried to use it in my code but it still gives the 401 error.
When I try to get the "WWW-Authenticate" header it returns a jauth realm link and token_uri link. I'm not sure what to do with it and what it means.
Any help or tips are greatly appreciated!
Thanks in advance!
|
One answer
![]()
Ralph Schoon (61.8k●3●36●43)
| answered Jun 23 '22, 1:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER As far as I can tell, the friendship link does not solve the login problem. It might play a role in OAuth authentication. I have played with OAuth, but with limited success, because it seems to still require the user to authenticate.
I have created https://rsjazz.wordpress.com/2021/10/15/elm-authentication/ to explain my experiences with ELM Authentication. It explains all the different options (as far as I was able to figure them out) of the dance. The blog also has a link to some more information regarding OAuth.
The authentication code I use is not fully published. You might be able to steal something from
PyPI ELM Client – Python client with examples by Ian Barnard.
|