FAQs & Troubleshooting

Common questions and solutions for integrating Redacto CMP.

Frequently Asked Questions

General

Q: What is a consent user?

A consent user represents a data principal (an individual whose data you process) in Redacto CMP. Each consent user has a unique identifier (org_user_id) and can have associated email, phone, and metadata.

Q: What's the difference between org_user_id, email, and mobile identifiers?

  • org_user_id: Your system's unique identifier for the user (e.g., customer ID)
  • email: User's email address, can be used for privacy center login
  • mobile: User's phone number, can be used for privacy center login

All three are stored and can be used to look up users, but org_user_id is the primary identifier.

Q: When are consent users created?

Consent users are created when:

  1. Consent is submitted through the SDK (the user is created automatically using the identifier in the token)
  2. You explicitly create them via the User Management API

Token generation does not create consent users - it only creates a JWT for authentication. This allows you to generate tokens for anonymous IDs or temporary identifiers without creating user records until consent is actually given.

Q: How long are JWT tokens valid?

  • Access tokens: 60 minutes by default
  • Refresh tokens: 1 day by default

Use the refresh token to obtain new tokens before expiration.

SDK

Q: Which component should I use - modal or inline?

Use CaseRecommended Component
Initial consent on signup/loginRedactoNoticeConsent (modal)
Consent embedded in formsRedactoNoticeConsentInline
Blocking consent requirementRedactoNoticeConsent (modal)
Progressive consent collectionRedactoNoticeConsentInline

Q: Can I show the inline component before having tokens?

Yes. RedactoNoticeConsentInline can display consent content using just org_uuid, workspace_uuid, and notice_uuid. Tokens are only required when submitting consent.

Q: How do I know if the user needs to give consent?

Use validateAgainst="all" or validateAgainst="required" in the modal component. The SDK will check the user's consent status and only show the modal if consent is needed.

Q: Can users re-submit consent?

Yes. To allow re-submission with the inline component, provide a new accessToken. The component tracks submissions per token to prevent duplicates.

User Linking

Q: When should I link users?

Link users when you identify that multiple consent records belong to the same person:

  • After anonymous users register
  • When merging accounts
  • When consolidating multi-channel consent

Q: What happens to consent when users are linked?

The primary user retains all consent records from linked (alias) users. The alias users' consent history is associated with the primary user.

Q: Can I unlink users?

Currently, linking is a one-way operation. Contact support if you need to unlink users.

Common Issues

Component Not Rendering

Symptoms: The consent component doesn't appear on the page.

Solutions:

  1. Check required props:

    // Modal: requires noticeId, accessToken, refreshToken
    <RedactoNoticeConsent
      noticeId={NOTICE_UUID}       // Required
      accessToken={token}          // Required
      refreshToken={refreshToken}  // Required
      onAccept={() => {}}          // Required
      onDecline={() => {}}         // Required
    />
    
    // Inline: requires org_uuid, workspace_uuid, notice_uuid
    <RedactoNoticeConsentInline
      org_uuid={ORG_UUID}          // Required
      workspace_uuid={WORKSPACE_UUID} // Required
      notice_uuid={NOTICE_UUID}    // Required
    />
  2. Verify tokens are valid:

    // Check token expiration before rendering
    if (isTokenExpired(accessToken)) {
      await refreshTokens();
    }
  3. Check browser console for errors:

    • CORS errors: Ensure your domain is allowed
    • 401 errors: Token may be invalid or expired
    • 404 errors: Check UUIDs are correct
  4. Verify UUIDs:

    • Copy UUIDs directly from Redacto Console
    • Ensure no extra whitespace

Consent Not Submitting

Symptoms: User clicks accept but consent isn't recorded.

Solutions:

  1. For inline component, check all conditions:

    // All must be true for auto-submit:
    // 1. accessToken is provided
    // 2. Content is loaded
    // 3. Required elements are checked
    
    <RedactoNoticeConsentInline
      accessToken={tokens.accessToken}  // Must be set
      onValidationChange={(valid) => {
        console.log("Validation:", valid);  // Must be true
      }}
    />
  2. Handle 409 Conflict (already consented):

    onError={(error) => {
      if (error.status === 409) {
        // User already consented, treat as success
        handleSuccess();
      }
    }}
  3. Check network tab for failed requests

  4. Verify token matches user:

    • Token should be generated for the same user

Token Generation Failing

Symptoms: Backend returns errors when generating tokens.

Solutions:

  1. Verify CMS API Key:

    // Check key is set
    if (!process.env.CMS_API_KEY) {
      throw new Error("CMS API Key not configured");
    }
    
    // Check header format
    headers: {
      "X-CMS-API-Key": process.env.CMS_API_KEY,  // Exact header name
    }
  2. Provide at least one identifier:

    // At least one required:
    {
      org_user_id: "user123",  // OR
      email: "[email protected]",  // OR
      mobile: "+1234567890"
    }
  3. Check UUIDs in URL:

    /organisations/{org_uuid}/workspaces/{ws_uuid}/tokens/generate
  4. Verify API key has correct permissions

Validation Not Working

Symptoms: onValidationChange never fires or always returns false.

Solutions:

  1. Ensure callback is provided:

    <RedactoNoticeConsentInline
      onValidationChange={(isValid) => {
        setConsentValid(isValid);
      }}
    />
  2. Check notice configuration:

    • Verify required data elements are configured in the notice
    • Ensure notice is published and active
  3. Wait for content to load:

    • Validation occurs after consent content is fetched

User Not Found After Creation

Symptoms: Can't retrieve a user immediately after creating them.

Solutions:

  1. Use the correct endpoint:

    GET /consent-users/by-org-user-id/{org_user_id}  // Use current org_user_id
  2. Handle 409 on create:

    • 409 means user exists, use the returned existing_user
  3. Check workspace scope:

    • Users are scoped to workspace
    • Ensure you're querying the correct workspace

Linking Fails

Symptoms: Link users API returns errors or unexpected results.

Solutions:

  1. Check primary user exists:

    • 404 means primary user not found
    • Create the primary user first
  2. Primary cannot be an alias:

    • 422 means primary is already an alias
    • Choose a different primary user
  3. Handle conflicts:

    const result = await linkUsers({...});
    
    // Check conflicts
    if (result.conflicts.length > 0) {
      // These users are already linked to someone else
      console.log("Conflicts:", result.conflicts);
    }

Error Codes

StatusDescriptionSolution
400Bad RequestCheck request body format and required fields
401UnauthorizedVerify API key or token is valid
404Not FoundCheck UUIDs and ensure resource exists
409ConflictResource already exists; use existing data
422Unprocessable EntityValidation failed; check field values
500Server ErrorRetry request; contact support if persistent

Best Practices Checklist

Backend Setup

  • CMS API Key stored in environment variables
  • API Key never exposed to frontend
  • Token generation endpoint implemented
  • Token refresh endpoint implemented
  • Rate limiting configured
  • Error handling in place

Frontend Integration

  • SDK installed and imported correctly
  • UUIDs configured (org, workspace, notice)
  • Token management implemented
  • Error callbacks provided (onError)
  • Success callbacks handle navigation/state
  • Loading states shown to users

User Management

  • Consent users created with explicit org_user_id
  • Anonymous IDs linked after registration
  • Multi-channel users consolidated
  • Conflict handling implemented

Webhooks

  • Endpoint uses HTTPS
  • Idempotency implemented (check event_id)
  • Errors logged for debugging
  • Async processing for long operations
  • Retry-friendly (returns 2xx on success)

Getting Help

If you're still experiencing issues:

  1. Check the browser console and network tab for detailed errors
  2. Review the API Reference for endpoint details
  3. Contact Redacto support with:
    • Error messages
    • Request/response details
    • Organisation and workspace UUIDs
    • Steps to reproduce

Next Steps