Hi,
I am getting 401 error on calling rest api, while i am using rest api on the page its working fine .But if i am using the same rest api inside the popup i am getting 401 error. Can anyone help me with the solution.
Regards,
Koushik
I am not setting the token for the api call
Hi Koushik,While calling API from popup, can you check if you are getting CORS (cross-origin) error? Also check you are calling correct API with http or https as per your requirements. Regards,Palak Patel
Hi Palak,
I am not getting the CORS error and its not the problem with http or https.
Hi Koushik,If possible share your oml or screenshot from which we can replicate the issue to better assist you. Regards,Palak Patel
Hi Koushik,
The error you are getting is on the load of popup or when you call the API ?
Did yo specify any role on the popup ?
Pramod Jain
Hi Pramod,
Inside the popup i am having the button on the button click i am calling the API, I am having set of roles in my application but i selected all those roles but i am facing the issue.
Did you checked the API logs in service center , if possible can you please share the screen shot for the same.
-PJ-
PRAMOD JAIN wrote:
i am getting the following error in the service center
The only conclusion that can be made from the error stack is that the 401 is indeed comming from your remote service.
How is the authentication made on that call? It has authentication information in the SelectClientHunterRequest structure? What does the service on the other side check?
A bit on a side note, but that generic rest call there is a bit weird, doesn't that make it hard to maintain it? Looks like you losing most of the REST API advantages and productivity boost that the platform gives you there.
João Rosado