> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # GetCookieBannerSettings # Package: cookieConsentPolicy # Namespace: CookieBannerSettingsService # Method link: https://dev.wix.com/docs/api-reference/business-management/cookie-consent-policy/cookie-banner-settings/get-cookie-banner-settings.md ## Permission Scopes: Read Cookie Consent Banner: SCOPE.COOKIE-CONSENT-BANNER.READ ## Introduction Retrieves the cookie banner settings. --- ## REST API ### Schema ``` Method: getCookieBannerSettings Description: Retrieves the cookie banner settings. URL: https://www.wixapis.com/wixpress/cookie-banner-settings/v1/cookie-banner-settings Method: GET Method parameters: query param name: languageCode | type: languageCode | description: Language code in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format, to return translated texts. All [languages supported by Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available) can be passed. Return type: GetCookieBannerSettingsResponse - name: settings | type: CookieBannerSettings | description: Cookie banner settings. - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements. - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button. - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner. - name: expiryDate | type: string | description: For internal use. - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details. - name: theme | type: Theme | description: Visual theme. - enum: unknown_theme, light, dark, custom - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button. - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times. - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner. - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration. - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: name | type: string | description: Color name. - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: fontFamily | type: string | description: Font displayed on the cookie banner. - name: fontSize | type: string | description: Font size displayed on the cookie banner. - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner. - enum: unknown_corner_radius, square, rounded_corners, round - name: enabled | type: boolean | description: Whether the banner is activated. - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy. - ONE-OF: - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy. - name: slug | type: string | description: Slug of the site page containing the privacy policy. - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy. - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy. - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description: - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL - name: translations | type: object | description: Translated texts, if requested. ``` ### Examples ### GetCookieBannerSettings ```curl ~~~cURL curl POST 'https://wixapis.com/cookie-consent/v1/cookie-banner-settings/get/’ \ -H 'Authorization: ' \ ~~~ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.cookieConsentPolicy.CookieBannerSettingsService.getCookieBannerSettings(options) Description: Retrieves the cookie banner settings. Method parameters: param name: options | type: GetCookieBannerSettingsOptions none - name: languageCode | type: string | description: Language code in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format, to return translated texts. All [languages supported by Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available) can be passed. Return type: PROMISE - name: settings | type: CookieBannerSettings | description: Cookie banner settings. - name: cookiePolicyRequirementApproved | type: boolean | description: Whether the site contributor has acknowledged the consent policy requirements. - name: declineAllConfig | type: DeclineAllConfig | description: Configuration settings for the "decline all" button. - name: enabled | type: boolean | description: Whether to show the "decline all" button on the cookie banner. - name: expiryDate | type: Date | description: For internal use. - name: texts | type: object | description: Texts to be displayed on the cookie banner. See [Banner texts]() for details. - name: theme | type: Theme | description: Visual theme. - enum: unknown_theme, light, dark, custom - name: revisitSettingsConfig | type: RevisitSettingsConfig | description: Configuration settings for the "revisit settings" button. - name: enabled | type: boolean | description: Whether to show a minimized cookie banner on all pages at all times. - name: buttonPosition | type: ButtonPosition | description: Position of the minimized cookie banner. - enum: unknown_button_position, bottom_right, bottom_left, center_right, center_left - name: customThemeConfig | type: CustomThemeConfig | description: Custom theme configuration. - name: primaryColor | type: SiteColor | description: Primary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: name | type: string | description: Color name. - name: value | type: string | description: Color value in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: secondaryColor | type: SiteColor | description: Secondary color displayed on the cookie banner in [hex](https://www.color-hex.com/color-palette/1018144) format. - name: fontFamily | type: string | description: Font displayed on the cookie banner. - name: fontSize | type: string | description: Font size displayed on the cookie banner. - name: cornerRadius | type: CornerRadius | description: Corner style for buttons on the cookie banner. - enum: unknown_corner_radius, square, rounded_corners, round - name: enabled | type: boolean | description: Whether the banner is activated. - name: privacyPolicyPageInfo | type: PrivacyPolicyPageInfo | description: Location of the site's privacy policy. - ONE-OF: - name: slugDetails | type: SlugDetails | description: Internal page slug containing the privacy policy. - name: slug | type: string | description: Slug of the site page containing the privacy policy. - name: externalPageUrlDetails | type: ExternalPageUrlDetails | description: External URL containing the privacy policy. - name: externalPageUrl | type: string | description: URL of the external page containing the privacy policy. - name: privacyPolicyDetailsReferenceType | type: PrivacyPolicyDetailsReferenceType | description: - enum: UNKNOWN_PRIVACY_POLICY_TYPE, SLUG, EXTERNAL_PAGE_URL - name: translations | type: object | description: Translated texts, if requested. ``` ### Examples ### getCookieBannerSettings ```javascript import { cookieBannerSettings } from '@wix/consent-policy'; async function getCookieBannerSettings(options) { const response = await cookieBannerSettings.getCookieBannerSettings(options); }; ``` ### getCookieBannerSettings (with elevated permissions) ```javascript import { cookieBannerSettings } from '@wix/consent-policy'; import { auth } from '@wix/essentials'; async function myGetCookieBannerSettingsMethod(options) { const elevatedGetCookieBannerSettings = auth.elevate(cookieBannerSettings.getCookieBannerSettings); const response = await elevatedGetCookieBannerSettings(options); } ``` ### getCookieBannerSettings (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { cookieBannerSettings } from '@wix/consent-policy'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { cookieBannerSettings }, // Include the auth strategy and host as relevant }); async function getCookieBannerSettings(options) { const response = await myWixClient.cookieBannerSettings.getCookieBannerSettings(options); }; ``` ---