Skip to content

Consent Banner — Overview

The consent banner is a UI component that presents consent purposes to a data principal at a specific collection point. When mounted, it fetches its configuration from the truConsent API, renders the relevant purposes, and records the data principal’s decision in an immutable audit log.

Use the consent banner for:

  • Collecting first-time consent at user signup or onboarding
  • Re-surfacing consent when your data processing purposes change
  • Allowing data principals to update or withdraw consent at any time (DPDPA Section 6)

  1. You register an asset (your app or website) and a collection point (e.g. “Signup Form”) in the truConsent dashboard.
  2. At runtime, the SDK fetches the banner configuration using your assetId and bannerId.
  3. The banner renders the purposes configured for that collection point.
  4. The data principal approves, declines, or partially consents — the decision is written to the audit log.
  5. On subsequent renders, if the user has already consented to all active purposes, the banner auto-dismisses without any visible flash.

  • A generated API key with Consent scope (and an Admin scope key for setup).
  • Your organization ID.
  • At least one active asset and one active collection point in the truConsent dashboard.

  1. Get your asset ID — Call the Management API to retrieve the UUID of the asset you are integrating.

  2. Get your collection point ID — Fetch the display_id (bannerId) for the collection point you want to render.

  3. Mount the SDK — Pass apiKey, organizationId, assetId, and bannerId to the component. Choose your platform: