Skip to main content
Solved

How to utilize CSRF Token which is returned in the header for JSON Call


Forum|alt.badge.img

Currently I have two plan files. The first one retrieves the CSRF Token (In the response debug file). The second one uses the response debug file and extracts the Cookie and the CSRF Token but when I pass these two to the JSON Call in the final step to write some data to SAP. I get the CSRF Token Validation failed.
I am extracting these from the Response debug file and passing them in another JSON Call:
 

Any suggestions on how to solve this issue?

Best answer by EmmanuelF

Hi ​@AKislyakov,

Thanks for the reply. 
I figured out the issue, I was passing the header in the POST as SET-COOKIE while it should have been COOKIE.
 

After correcting this mistake I am able to write to SAP as such.
 

 

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+2
  • Ataccamer
  • 167 replies
  • August 8, 2025

Hi ​@EmmanuelF,

 

You can enable Request Debug File in the JSON Call to check what values were sent to SAP


Forum|alt.badge.img
  • Author
  • Universe Traveller
  • 4 replies
  • Answer
  • August 8, 2025

Hi ​@AKislyakov,

Thanks for the reply. 
I figured out the issue, I was passing the header in the POST as SET-COOKIE while it should have been COOKIE.
 

After correcting this mistake I am able to write to SAP as such.
 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings