--- title: "Set GDPR consent" slug: "webview-set-gdpr-consent" description: "Grant or revoke GDPR data-collection consent using setGDPRConsent. Required before sharing user data." updated: 2026-02-11T11:17:48Z published: 2026-02-11T11:17:48Z canonical: "academy.insiderone.com/webview-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 This method allows you to set your users' consent to collect data. You can call this method after the SDK initialization at every step where you request your users' consent. | Parameter | Type | Description | Required | | --- | --- | --- | --- | | consented | Boolean | *true* = granted *false* = revoked | Yes | **Method signature** ```typescript setGDPRConsent(consented: boolean) : Promise ``` **Method example** ```typescript await window.insider.setGDPRConsent(true); ```