Consent Widget Integration
Consent Widget Integration
Easy integration for web and mobile applications
Body (JSON)
{
"cr_id": "CONSENT_REQUEST_ID",
"callback_url": "https://yourapp.com/consent-callback",
"language": "en",
"meta": {
"platform": "web",
"version": "1.0.0"
}
}
API Samples
- SHELL
- AXIOS
- PYTHON
- NODE
curl -X POST \
'https://consent.example.com/api/v1/consent/request' \
-H 'Content-Type: application/json' \
-d '{
"cr_id": "CONSENT_REQUEST_ID",
"callback_url": "https://yourapp.com/consent-callback",
"language": "en"
}'
import axios from 'axios';
const payload = {
cr_id: 'CONSENT_REQUEST_ID',
callback_url: 'https://yourapp.com/consent-callback',
language: 'en'
};
await axios.post('https://consent.example.com/api/v1/consent/request', payload, {
headers: {
'Content-Type': 'application/json'
}
});
import requests
payload = {
'cr_id': 'CONSENT_REQUEST_ID',
'callback_url': 'https://yourapp.com/consent-callback',
'language': 'en'
}
response = requests.post(
'https://consent.example.com/api/v1/consent/request',
json=payload,
headers={'Content-Type': 'application/json'}
)
const payload = {
cr_id: 'CONSENT_REQUEST_ID',
callback_url: 'https://yourapp.com/consent-callback',
language: 'en'
};
const response = await fetch('https://consent.example.com/api/v1/consent/request', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
const result = await response.json();
Overviewβ
The Consent Widget allows you to integrate consent management into your web or mobile application. Users can review, grant, and revoke consent for data collection with a simple, intuitive interface.
Web Applications
Embed the consent widget directly in your web app using iframe or redirect.
Mobile Applications
Open the widget in a browser with deep linking support for seamless callback handling.
Secure & Compliant
Built with privacy-first principles and regulatory compliance in mind.
Multi-Language
Support for 22+ languages with dynamic language selection.
Getting Startedβ
Before you deploy the widget, make sure you have the right configuration. You will need a valid Consent Request ID (CR_ID) and a callback path that the widget can redirect to once the user completes the flow.
Before You Startβ
- Obtain a Consent Request ID (CR_ID) from your data fiduciary setup
- Set up authentication/user identification in your application
- Configure callback URLs for mobile apps (deep linking)
- Test the integration in a development environment
API Referenceβ
The Consent API returns a oneβtime URL for the widget and optionally the status of the consent. You can explore the full API documentation on the API Reference page.
Web Integrationβ
Before proceeding with web integration, you must first set up the API from the API Reference tab to obtain the consent URL.
Launch the consent widget in a centered, resizable popup window. This example keeps the window focused on the user and automatically handles the message returned by the widget.
const openConsentWindow = () => {
const url = 'https://consent.example.com/consent?cr_id=...&callback_url=' +
encodeURIComponent(window.location.origin + '/consent-callback');
window.open(url, 'consentWindow', 'width=500,height=600');
};
Important Notesβ
- Replace response with your actual consent API response URL
- The window is centered on screen and fully resizable
- Users can interact with both the popup and parent window
Mobile Integrationβ
Before proceeding with mobile integration, you must first set up the API from the API Reference tab to obtain the consent URL.
Use deep linking to bring users back into the app after they finish the consent journey.
Deep Linking Setupβ
{
"expo": {
"scheme": "myapp",
"plugins": [
[
"expo-url-handler",
{
"scheme": "myapp"
}
]
]
}
}
<activity
android:name=".ConsentActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="myapp"
android:host="consent"
android:path="/callback" />
</intent-filter>
</activity>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.example.myapp</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
</dict>
</array>
Platform Guidesβ
Expo
Use Expo Linking to open the consent widget and capture deep link responses.
React Native
Open the consent URL from React Native and listen for callbacks on both platforms.
Flutter
Launch the consent window from Flutter and handle the deep-link channel.
Android (Java)
Use an activity to trigger the widget and parse the callback intent.
Android (Kotlin)
Launch the widget from Kotlin and handle intent callbacks safely.
Kotlin Compose
Compose-friendly button that uses Jetpack to open the consent window.
iOS (Objective-C)
Objective-C controllers that open Safari and read the deep link callback.
Ready to Integrate?β
Ready to Integrate?
Contact us for a demo or to get your Consent Request ID.
Get Started