I have encountered the x-csrf token issue. The token is extracted from SAP Bydesign to authenticate the SAP Bydesign. I can extract the token using http get method and this token can not use to authenticate. The token always changes when the UiPath program runs. I tested the SAP Bydesign API call using the Postman. The Postman works well but the UiPath Studio can not work. I used the uipath.web.activity in UiPath Studio to call the API services. Please let me know when you know the solution. Thanks.
Would you mind trying out sending your API calls to a service like https://webhook.site/ or https://pipedream.com/ to try and see the difference between the two API calls (one from UiPath HTTP Request activity and one presumably working one from Postman?
(or a local node.js service if you’d like of course)
This is usually the best place to start when one works and the other doesn’t
i am facing the same problem right now, did you solve the problem,
it runs well on postman, but not work on uipath studio, it says “CSRF token validation failed”.
if you have any good idea, please let me know , thanks!
Update: Hey guys. I read Set-Cookie header from GET request and added them in Cookies of POST request.
There are 2 cookies. One of them contains “=” and that’s why it didn’t work earlier. I replaced “=” with “%3D” and it’s working fine.
Refer the Name and Value of Cookies in Cookies tab of response in Postman and make sure you give the value of cookies in same format in Cookies of http request in UiPath.
Example of my case:
Header response of GET request in UiPath:
Set-Cookie - ABCD=25
I used ABCD=25 in Cookies of POST request in UiPath but it threw an error.
Checked the Cookie response of GET request in Postman. See below.
I replaced “=” with “%3D” in UiPath and used ABCD%3D25 in Cookies of POST request in UiPath and it worked.
If this helps you, please mark it as solution. Thanks guys.