Didomi - Developers documentation
  • Introduction
  • SDKs
    • Introduction
    • Web SDK
      • Getting started
      • Tags and vendors management
        • Tags management
          • Events & Variables
            • Deprecated
            • Custom events
          • Tag managers
            • Adobe Launch/DTM
            • Eulerian
            • Google Tag Manager
              • Configure the Didomi / GTM integration
              • Didomi's GTM template
            • Tealium
            • Other tag managers
        • Custom Didomi <script> tags
        • Third-party integrations
          • Google Ad Manager / AdSense
            • GDPR via Non-Personalized Ads
              • Share consent and load/refresh ads
              • Share consent without loading or refreshing ads
            • US states laws
          • Google Consent Mode V2
          • Kameleoon
          • Piano Analytics (AT Internet)
          • Prebid
            • GDPR via IAB TCF
            • US states laws
          • Salesforce DMP (Krux)
        • IAB frameworks
        • Programmatic API
      • Configuration
        • Bots (SEO & Performance tools)
        • Configuration by URL
        • Cookies and storage
        • Custom domains for events
        • Notice
          • Behavior
          • Interactions
          • Look and feel
        • Preferences
        • Theme
      • AB tests
      • Custom domain
        • Domain delegation
        • Reverse proxy
      • Share consents between domains
      • Share consents across devices
      • Pass user choices in query string
      • Serve Didomi assets from your domain
      • Reference
        • API
          • Deprecated
        • Events
      • Performance
    • Mobile and TV SDKs
      • Android and Android TV
        • Setup
        • Logging
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • iOS and tvOS
        • Setup
        • Logging
        • App Tracking Transparency (iOS 14.5+)
        • Reference
          • API
            • Deprecated
          • Events
        • Versions
      • Unity
        • Setup
        • Reference
        • Versions
        • Troubleshooting
      • React Native
        • Setup
        • Reference
          • Deprecated
        • Versions
      • Flutter
        • Setup
        • Reference
        • Versions
      • Consent notice
        • Getting started
        • Customize the notice
        • Customize the preferences popup
        • Customize the theme & UI
        • Load notice by ID
      • Third-party SDKs
      • Share consents across devices
      • Share consent with WebViews
      • Google Consent Mode v2
      • FAQ
    • AMP SDK
      • Blocking Behaviors
        • Load immediately on page load
        • Load only after consent (positive or negative)
        • Load only after positive consent
      • Consent status for vendors
    • Didomi Consent String
      • Didomi Consent String Structure
      • Purposes & Vendors Numerical IDs
      • Consent String Examples
      • Decoding tools
    • Help & Support
  • API
    • Introduction
      • Authentication
      • Errors
      • Pagination
      • Filters
      • Caching
      • Rate limiting
      • Quotas
      • Translations
    • Data Manager
      • Regulations
      • Configuration Tree
      • Purposes
        • Purposes & Vendors Numerical IDs
      • Preferences Library
      • User Rights
    • Widgets
      • Consent notices
        • Notices
        • Configurations
        • Multi-Regulation Configurations
          • Migration of Existing Notices and API Updates
        • Deployments
        • Tutorials
          • Create and publish a consent notice
          • Create and publish a multi-regulation consent notice
      • Privacy widgets
        • Create a widget
        • Retrieve widgets
        • Edit a widget
          • Content & Design
            • Themes & Shapes
            • Components
              • auth
              • dsar_form
              • footer
              • header
              • preference
              • preference_value
              • save
              • section
              • sections
            • Options
          • Purposes & preferences
          • Settings
        • Deploy a Widget
          • Use your own subdomain
          • Use your own domain
          • Implement an embeddable widget on your website
        • Authentication
          • Manage authentication providers
          • Authenticate your end-user
        • Archive a widget
        • Headless widgets
          • Public Methods
          • Custom elements
          • Custom events
          • Event listeners
        • Tutorial
          • Launch a Preference Center from a mobile app
    • Compliance Reports
      • Properties
      • Reports
      • CSV format reference
      • Websites
    • Consents and Preferences
      • Events
        • Generate IAB TCF consent string
      • Links
      • Proofs
      • Tokens
      • Secrets
      • Users
      • Tutorial
        • Collect and operate data
    • Privacy Requests
      • Requests
      • Notes
      • Links
      • Emails
  • Integrations
    • Introduction
      • Quotas
    • Generic integrations
      • Batch export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
        • Exported data
          • Notices consents
        • Logs
      • Webhooks
      • Batch import
      • Analytics export
        • Destinations
          • AWS S3 Bucket (owned by Didomi)
          • GCP Storage Bucket
    • Third-party apps
      • CMP integrations
        • Didomi-mParticle integration for your CMP
        • Deploy Didomi’s SDK for your Adobe Commerce website
      • Preference Management Platform integrations
        • Actito
        • Adobe Campaign Classic
        • Adobe Experience Cloud
        • Adobe Marketo Engage
        • Adobe Source Connector
        • Braze
        • Dotdigital
        • Hubspot
        • Mailchimp
        • Microsoft Dynamics 365
        • Salesforce Marketing Cloud
        • Salesforce Sales & Service Cloud
        • Selligent
        • Brevo (ex Sendinblue)
    • Tutorials
      • Configure a HTTP webhook
      • Configure a batch export
      • Configure an analytics export
    • Emailing
      • Configurations
        • Actito Email
        • Actito SMS
        • Adobe Campaign Classic
        • Adobe Campaign Standard
      • Emails
        • Templates
        • Manage your templates
Powered by GitBook
On this page
  • Example #1: Consent String with DID, OUID, and Signature
  • Example #2: Consent String with only DID and Signature
  • Example #3: Consent String with only OUID and Signature
  • Example #4: Consent String with no IDs, only Signature
  • Example #5 - Decoded Consent String
  • Final Encoding Example
  1. SDKs
  2. Didomi Consent String

Consent String Examples

This page contains samples of different consent strings that can be generated as part of the binary Didomi Consent String format under different scenarios.

Didomi Consent String := Sections~Signature |												 Sections.DID~Signature |
                         Sections.DID.OUID~Signature |
                         Sections..OUID~Signature

Example #1: Consent String with DID, OUID, and Signature

Given Header, Purpose Consent, Purpose Legitimate Interest, Vendors Consent and Vendors Legitimate Interest sections bit encoded in the first segment:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA

After the first . there is a Device ID (DID):

AQAACAFkVONkgUIavQPm

and after the second . there is an Organization User ID (OUID):

XF229L4wQrauAgOe/AGP0SP7fa7bclNhB0

and finally, the last segment after the ~ is the signature:

CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Putting this all together, the final consent string would look like:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA.AQAACAFkVONkgUIavQPm.XF229L4wQrauAgOe/AGP0SP7fa7bclNhB0~CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Example #2: Consent String with only DID and Signature

Given Header, Purpose Consent, Purpose Legitimat Interest, Vendors Consent and Vendors Legitimate Interest sections bit encoded in the first segment:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA

After the first . there is a Device ID (DID):

AQAACAFkVONkgUIavQPm

and finally, having no OUID, the last segment after the ~ is the signature:

CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Putting this all together, the final consent string would look like:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA.AQAACAFkVONkgUIavQPm~CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Example #3: Consent String with only OUID and Signature

Given Header, Purpose Consent, Purpose Legitimat Interest, Vendors Consent and Vendors Legitimate Interest sections bit encoded in the first segment:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA

Even though we don’t have a DID, we still store a first . as a placeholder to represent a nullable optional DID here, which will contain no information. We will then add a second . characterm indicating that there is an Organization User ID (OUID):

XF229L4wQrauAgOe/AGP0SP7fa7bclNhB0

and finally, the last segment after the ~ is the signature:

CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Putting this all together, the final consent string would look like:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA..XF229L4wQrauAgOe/AGP0SP7fa7bclNhB0~CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Example #4: Consent String with no IDs, only Signature

Given Header, Purpose Consent, Purpose Legitimat Interest, Vendors Consent and Vendors Legitimate Interest sections bit encoded in the first segment:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA

Since we have neither a DID nor an OUID, we will not store any . placeholders. We will directly add the final segment after the ~ which is the signature:

CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Putting this all together, the final consent string would look like:

BGHWv4UYba5-dZnABdKu__D6iWHsD6iWHsCABFKVEACKUqgAAERY4AABEWMA~CAISHAgCEhJnd3NfMjAyMzA0MDYtMF9SQzEaAmVuIAEaBgiAo82hBg

Example #5 - Decoded Consent String

const expectedUserStatus = {
   user_id: '1875afe1-461b-6b9f-9d66-700174abbffc',
   created: new Date('2023-04-12T18:10:00.000Z'),
   updated: new Date('2023-04-12T18:10:00.000Z'),
   sync: new Date('2023-05-24T18:10:00.000Z'),
   vendors: {
     enabled: [128, 129, 130, 131, 132],
     disabled: [],
   },
   purposes: {
     enabled: [1, 2, 6, 7, 8],
     disabled: [3, 4],
   },
   vendors_li: {
     enabled: [128, 129, 130, 131, 132],
     disabled: [],
   },
   purposes_li: {
     enabled: [1, 2, 6, 7, 8],
     disabled: [3, 4],
   },
};

Final Encoding Example

When stored or transmitted, the Consent String binary format is encoded as web-safe base64 with the following character set:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
PreviousPurposes & Vendors Numerical IDsNextDecoding tools

Last updated 14 days ago