Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CSRF TOKEN VALIDATION FAILED IN ODATA

0 Kudos
856

hi..while i runing get method it works fine and i have requested use as request the below gets displayed

when i run post method i am getting below error has CSRF token validation failed..how can i fix it.

Can any one help me ,..how to fix it

4 REPLIES 4

MateuszAdamus
Active Contributor
0 Kudos
353

The images failed to upload.

Are you setting the cookies too, with the token?


Kind regards,
Mateusz

0 Kudos
353

odata2.pngodata1.png

No Mateusz ...i am not setting any cookies..

MateuszAdamus
Active Contributor
0 Kudos
353

You need to return the same cookies which you get when you request the token. Token is valid for a session only, and cookies define the session.


Kind regards,
Mateusz

0 Kudos
353

i set same cookies ...i didnt changed cookies...and token got generated which runing post method only..not for get methods.