2 weeks ago
Hello Experts,
I am working on a scenario where i want to Post BATCH in SAP S4 Hana System.
Working on POSTMAN Tool :
1. GET CSRF Token from the API and Put in the Header of Request
2. x-csrf-token : _______________ and Basic Auth.
It is working fine in the POSTMAN Tool
In order to make this work on SAP CPI, I developed a iflow
1. Hold Payload : Holds the JSON Payload
2. XML to JSON : It converts JSON to XML for capturing the fields in XPATH
3. Content Modifier : It captures Xpath
4. Content Modifier :
5. Request Reply : It sends the GET Request to the API and gets the CSRF Token which will be later used to create POST Request.
6. Content Modifier : (Capture Token) In this step we can log the retrieved CSRF Token by using ${header.x-csrf-token}
7. Request Reply : In this step i am creating a POST Request to create Batch in which it is mandatory to send csrf token in the header.
But when i am deploying the iflow and test it from postman i am getting error as "403 CSRF Token Validation Failed"
So instead of using SAP API there i replaced it with a random webhook to see that what values i am passing in the header.
I am getting CSRF Token there in the Header value.
But why it is not working with SAP API.
Please elaborate your views
Regards,
Prathmesh Sutar
prathmeshsutar.sapcpi@gmail.com
Have you enabled http session reuse to on integration flow? Try with that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.