Page 1 of 1

[Error 401 Unauthorized] Rest API to connect to PM Table by operator role

Posted: Wed Jan 22, 2020 3:04 am
by orantip
Hi, everyone

I got an error about authorization. Firstly, I have a dropdown for selecting customer data and then I need to get the phone data from PM table. Then I use the Rest API for getting the phone data to put it on textfield. I found that if I am the admin role, it's ok. But if I am the operator role, I got the 401 Unauthorized. Please help me to solve this issue.

Thank you so much.
ORAN

Re: [Error 401 Unauthorized] Rest API to connect to PM Table by operator role

Posted: Thu Jan 23, 2020 12:25 am
by programerboy
Hi,
You can set query directly in your dropdown or your textbox, but if you want use ajax to get data please check this post:
https://forum.processmaker.com/viewtopic.php?f=44&t=737369#p827150

https://pmlearning.info
Thanks

Re: [Error 401 Unauthorized] Rest API to connect to PM Table by operator role

Posted: Fri Jan 24, 2020 5:06 am
by orantip
Hi,

Yes, this solution that I was looking for. I need to use Ajax to get data from Trigger. But I tried your approach then I didn't get the data back in .done(function).

How do I get the value from Trigger by using Ajax request?

How do I get the value from Ajax by using Trigger?

Thank you.

Re: [Error 401 Unauthorized] Rest API to connect to PM Table by operator role

Posted: Mon Jan 27, 2020 10:02 pm
by orantip
I already have got the solution.
Thank you so much.
viewtopic.php?t=713486