--- title: "Set GDPR consent" slug: "expo-set-gdpr-consent" description: "Grant or revoke GDPR data-collection consent in React Native using setGDPRConsent. Required before sharing user data." tags: ["react gdpr consent", "react native gdpr consent", "set gdpr consent for react"] updated: 2026-10-10T20:10:03Z published: 2026-10-10T20:10:03Z canonical: "academy.insiderone.com/expo-set-gdpr-consent" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Set GDPR consent > **Suggested reading**: [Insider and General Data Protection Regulation (GDPR)](https://academy.insiderone.com/docs/insider-and-gdpr) This method allows you to get your users' consent to collect data. You can call this method after the SDK initialization at every step where you request your users' consent. Insider SDK collects this data by default. You do not need to call this function if you are not asking for users' consent.  | Parameter | Data Type | | --- | --- | | gdprConsent | Boolean | If you set it to *false*, the user will not share any data or receive any push notifications until you set it back to *true*. ## Method Signature ```javascript static setGDPRConsent(gdprConsent) ``` ## Method Example ```javascript RNInsider.setGDPRConsent(true); ``` You must set the GDPR after the SDK initializes. You can place any GDPR handling after Insider SDK initializes. ## Related - [Insider One and General Data Protection Regulation (GDPR)](/insider-one-and-gdpr.md)