Question
ING NV
NL
Last activity: 19 Sep 2016 10:59 EDT
BASIC authentication of REST service
Hi All,
I am trying to access Pega 7 Process REST API to create a case. I have configured the service package to use authentication with BASIC authentication type.
(Example: username - Muthu password - rules)
Hi All,
I am trying to access Pega 7 Process REST API to create a case. I have configured the service package to use authentication with BASIC authentication type.
(Example: username - Muthu password - rules)
When i pass the authentication header from my rest client, I get a 401 unauthorized error.
API accessed:http://address:7002/prweb/api/v1/cases
(Authorization: Basic TXV0aHU6cnVsZXM=)
On the other hand, if i pass the UserIdentifier and Password as query string parameters, i am able to authenticate myself and execute the API.
API accessed: http://address:7002/prweb/api/v1/cases?UserIdentifier=Muthu&Password=cnVsZXM=
Please suggest
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
ING NV
NL
Thanks to Kevin for pointing me to the below
"for weblogic, there is some specific you have to do, see this link for details: https://docs-previous.pega.com/troubleshooting-weblogic-error-when-http-basic-authentication-enabled-soap-service"
PEG
PL
What I feel, it should propt for username and password. Is your pop up blocked?
Which browser you are using? Could you try with other browser as well?
ING NV
NL
PEG
IN
Hi,
I tried with http://address:7002/prweb/api/v1/cases
When I paste in firefox browser it prompted me for credentails. When I enter the credentails it worked fine.
Could you please cross verify at your end? I tried in PRPC7.2.
Please specify your PRPC version also.
ING NV
NL
Thanks Ganga, I am using 7.1.9.
When i past the url in the browser(firefox), i get a prompt for the credentials. I provide the same and click on submit. I am re-prompted to enter the credentials.
Pegasystems Inc.
CA
Have you tried invoking this service from an external REST client such as Postman or soapUI?
ING NV
NL
Pegasystems Inc.
CA
Also, have you tried testing this service from Pega API landing page inside Designer Studio? You will find the link under Resources menu item.
ING NV
NL
Pegasystems Inc.
US
I have tested both indepedent rest clients (soapui/cocarestclient) with pegaapi, it works for both 7.1.9 and 7.2.1. If you use the suggestion from Paraneeth, when you click 'try it out', you will be presented with browser popup to enter user/password, once you do that, it should be fine, see my screenshot:
Infosys
AU
HI Muthu,
I also faced issue with "401 unauthorized error", while invoking rest services. I resolved it by unchecking "External Authentication" on Operator ID rule.
Vamshi
ING NV
NL
Thanks Kevin and Vamshi,
I have tested this in the PVS instance of 7.1.9 that i installed in my laptop. The basic authentication is working without any issue.
Now i left thinking , what in my project environment setup (i.e different from PVS) might cause this issue this issue.
Accepted Solution
ING NV
NL
Thanks to Kevin for pointing me to the below
"for weblogic, there is some specific you have to do, see this link for details: https://docs-previous.pega.com/troubleshooting-weblogic-error-when-http-basic-authentication-enabled-soap-service"