CDKAdaptive Access

Product-level age assurance

How CDK asks users to prove their age at the age gate, and creates the session only after they pass.

Product-level age assurance is the part of Adaptive Access that asks for proof of age at the age gate, before a session exists. When it applies, POST /age-gate/check returns a CHALLENGE_AGE_GATE_AGE_ASSURANCE challenge instead of PASS. The user verifies themselves (no trusted adult is involved), and k-ID creates the session after the user passes.

Product-level age assurance was previously called Automatic age assurance.

For a step-by-step integration, see the Age assurance at entry quick start.

Turning it on

Product-level age assurance is controlled by Product-level access in Compliance Studio, under Engine & Overrides > Edit Global Rules, and can be changed per market. It's set to No unless you turn it on. When you set it to Yes, you also choose the trigger age: every user who claims that age or older must verify. The trigger age defaults to the market's Civil Age, and is never lower than the market's Digital Consent Age. See Configure Adaptive Access.

Product-level checks affect every user at or above the trigger age

Product-level age assurance verifies every user at or above the trigger age at sign-up, including users who never reach a restricted feature. If only some features need a verified age, use feature-level age assurance instead. Talk to your k-ID Account Manager before turning it on for a live product.

When it triggers

/age-gate/check checks the user in this order:

  1. Prohibited. If the product isn't available in the market, or the claimed age is below the product's minimum age, the response is PROHIBITED. No age assurance runs.
  2. Age assurance. If product-level age assurance is on for the market and the claimed age is at or above the trigger age, the response is a CHALLENGE_AGE_GATE_AGE_ASSURANCE challenge, unless a trustworthy platform age signal already proves the user meets the age.
  3. Pass. If the claimed age doesn't need parental consent, the response is PASS with a session.
  4. Parental consent. Otherwise the response is a CHALLENGE_PARENTAL_CONSENT challenge. Product-level age assurance doesn't change the parental consent path.

A trustworthy platform signal skips the challenge when its ageLow is at or above the age being checked. For example, an apple-ios signal with declarationType: governmentIDChecked. Signals from xbox and meta-horizon never skip it. For which signals count as trustworthy, see Platform age signals.

`ageAssuranceRequired` doesn't predict this challenge

The ageAssuranceRequired field from /age-gate/get-requirements reports a value you set under Age Assurance Reporting in Compliance Studio. It doesn't start a check, and it doesn't tell you whether /age-gate/check will return a CHALLENGE_AGE_GATE_AGE_ASSURANCE challenge. Always branch on challenge.type in the /age-gate/check response.

Example CHALLENGE_AGE_GATE_AGE_ASSURANCE response

{
  "status": "CHALLENGE",
  "challenge": {
    "challengeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "CHALLENGE_AGE_GATE_AGE_ASSURANCE",
    "url": "https://family.k-id.com/age-gate/verify?token=..."
  }
}

No session is returned. Unlike CHALLENGE_PARENTAL_CONSENT, the response doesn't include oneTimePassword. The url points to a page where the user verifies themselves, not to the trusted-adult consent portal, so you can present it directly.

Handling the challenge

  1. Show the challenge. Present challenge.url in the surface appropriate for your app:
    • a web iframe with allow="camera;payment;publickey-credentials-get;publickey-credentials-create"
    • a system browser on mobile (see the Mobile apps quick start)
    • an in-app browser surface
    • a QR code handoff on consoles
  2. Update your UI. For iframe or same-window hosts, the page posts a Verification.Result DOM message when the user finishes. Use it only to close the iframe; it isn't the result. For mobile or other hosts, pass a redirect URL (see Redirecting after the challenge).
  3. Confirm the result server-side. Use the Challenge.StateChange webhook or poll /challenge/get-status. On PASS, sessionId contains the newly created session.
  4. Load the session. Call /session/get with the sessionId to read the user's permissions.

If you use the age gate or end-to-end widget, the widget runs the check inside the flow. The Widget.AgeGate.Result event fires once the flow completes, and includes the sessionId on PASS.

No `Session.Created` webhook for these sessions

A session created after a product-level check is reported through Challenge.StateChange with status: PASS and a sessionId. k-ID doesn't send a separate Session.Created event for it.

What the session contains

When the user passes, k-ID creates the session:

  • Permissions and date of birth come from the age the check verified, such as the date of birth on an ID document, not from the age the user claimed. For example, a user who claims 35 and passes facial age estimation with an estimate of 19 gets a session for a 19-year-old.
  • Feature permissions that need a verified age are already unlocked up to the proven age. A user who proved they're 18 doesn't need another check for an 18+ feature.
  • ageVerification records the result, so later feature-level checks at the same or a lower age are granted without another challenge.

When the user fails, the challenge ends with status: FAIL, and no session is created.

Redirecting after the challenge

When the challenge runs in a top-level browser context (not an iframe), for example a mobile app that hands off to k-ID and then back, supply a redirect URL and k-ID sends the user to it once verification completes. Pass it as options.playerAgeAssurance.redirectUrl on /age-gate/check. The option applies only to CHALLENGE_AGE_GATE_AGE_ASSURANCE; CHALLENGE_PARENTAL_CONSENT returns through the trusted-adult flow instead.

The URL accepts http(s) and custom-scheme mobile deep links (for example myapp://age-gate/return). Unsafe schemes are rejected and no redirect occurs. After the user completes or dismisses the challenge, k-ID appends the following query parameters to your URL and navigates to it:

ParameterDescription
challengeIdThe challenge that was completed
productIdThe product the age gate was checked against
sessionIdThe newly created session (present only on PASS)
statusPASS or FAIL
typeThe challenge type, CHALLENGE_AGE_GATE_AGE_ASSURANCE

Existing query parameters on the redirect URL are preserved.

Example request:

POST /api/v1/age-gate/check
Content-Type: application/json
Authorization: Bearer your-api-key

{
  "jurisdiction": "US-CA",
  "dateOfBirth": "2008-04-15",
  "options": {
    "playerAgeAssurance": {
      "redirectUrl": "https://mygame.com/age-gate/return"
    }
  }
}

After a successful verification the user lands on, for example:

https://mygame.com/age-gate/return?challengeId=a1b2c3d4-e5f6-7890-abcd-ef1234567890&productId=42&sessionId=608616da-4fd2-4742-82bf-ec1d4ffd8187&status=PASS

The redirect back to your app isn't the result. Confirm the outcome server-side through the Challenge.StateChange webhook or /challenge/get-status before granting access.

On this page