cancel
Showing results for 
Search instead for 
Did you mean: 

Error 403 forbidden XCSRF token required while executing put method in sap gateway client

PallaviU
Participant

Hi,

I have implemented GET_ENTITY, GET_ENTITYSET, UPDATE_ENTITY methods in the OData service. When I try to execute OData service put method I am getting the error 403 forbidden XCSRF token required in HTTP response. I am passing x-csrf-token = fetch in GET method URL and its value in PUT method URL.

Can anyone please suggest to resolve this issue?

Thanks

Pallavi

jhodel18
Active Contributor
0 Kudos

Hi Pallavi, how do you consume the service? Through UI5 Model or something else? If possible, provide more information.

Accepted Solutions (0)

Answers (1)

Answers (1)

Private_Member_467521
Active Contributor
0 Kudos

Here is a similar case Pallavi,

https://stackoverflow.com/questions/42439795/csrf-403-forbidden-invalid-csrf-token

Not sure if what you have there is synchronous or asynchronous, but I'd suggest you take a look.

I found the code examples to be helpful.

Cheers,

Luis

PallaviU
Participant
0 Kudos

Hi Luis,

Thanks for your response.

I have tried to test the OData service using postman and followed the same steps as specified in this blog. But still same error message.

Please find the error snapshot.

https://blogs.sap.com/2020/03/27/using-postman-for-odata-netweaver-gateway-testing-crud-methods/