cancel
Showing results for 
Search instead for 
Did you mean: 

CSRF Token Missing Error in Android OData Service

Sharon_Shaji
Explorer
0 Kudos
139

Hello everyone,

I’m currently facing an issue with my application. It works perfectly in Cloud Foundry (Web), but when I deploy it in Mobile Services (Android), I encounter a “CSRF token is missing” error when posting data.

I’m working on an Android application that interacts with an OData service, and I need guidance on retrieving the CSRF token. I understand that CSRF protection is crucial for secure API calls, but I’m unsure how to implement this in my Android app.

Could anyone provide a step-by-step approach or share code snippets on how to obtain the CSRF token for an OData service? I’ve checked my configurations and ensured that CSRF protection is enabled, but the problem persists.

Has anyone else experienced this issue? Any insights or solutions would be greatly appreciated!

Thank you in advance for your help!

View Entire Topic
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

@Sharon_ShajiThe CSRF token should be handled automatically on mobile as well. We need to understand exactly what you tried and the error that appeared. Could you please create a support ticket with all the details?Pls. see this guide

Sourabh1
Explorer
0 Kudos
We are using an API for posting certain data. This API requires xcsrf token as a header parameter for successful post. But we are unable to generate xcsrf token in android. So, we want to ask is there any way to generate xcsrf token in android.
Sharon_Shaji
Explorer
0 Kudos
We are using an API for posting certain data. This API requires xcsrf token as a header parameter for successful post. But we are unable to generate xcsrf token in android. So, we want to ask is there any way to generate xcsrf token in android.
Sharon_Shaji
Explorer
0 Kudos
@Jitendra_Kansal , could you please provide a solution for this issue...