Collect consent in forms

A lot of your existing workflows like sign up, booking, newsletter subscription, etc. on websites or in mobile apps already collect user consent. With Didomi, you can easily push those consents into our platform.

Create a consent event

When you are collecting user consent, you simply need to push a new consent event to the Didomi API to store the user consent. We will automatically keep track of the history of the user status and merge the new consent event into that history.

To create a consent token, send an HTTP POST request to the Didomi API:

POST /consents/events?organization_id={organization_id}
{
"user": {
"organization_user_id": "user@domain.com"
},
"consents": {
"purposes": [
{
"id": "purpose_id",
"enabled": true
}
]
}
}

Read more about authenticating with the Didomi API and creating a consent event.

Firebase

If your app is using Firebase, you can easily create a consent event via a Cloud Function. We provide a Cloud Function to create a consent event that can be deployed to your Firebase account: https://github.com/didomi/firebase

The createConsentEvent Cloud Function will create a consent event with the user email from Firebase Authentication. It requires users to be authenticated via Firebase Authentication.