Initialize Age Estimation SDK

Installation via NPM:

npm install privo-age-estimation-sdk

Installation via CDN:

Integration Environment:

Development Environment (Typescript types):

Production Environment:

Production Environment (Typescript types):

<script src=""></script>

Initialization (via NPM):

  import { init } from "privo-age-estimation-sdk";

  await init(config) 

Initialization (via CDN):


  interface PartnerConfiguration {
    env: "int" | "prod";
    serviceIdentifier: string;

Age Estimation init entry parameters:

env - type of the PRIVO environment: int - for integration testing, prod - for real users
serviceIdentifier - service identifier provided by Privo.

Note: Before real usage please send an email request to to whitelist your site origin in the PRIVO CORS settings.

After initialization you can set up onStatusChange callback. See doc

Example (CDN):

<!DOCTYPE html>
  <title>Age Gate load Demo</title>
  <script src=""></script>
    window.onload = async () => {
          env: "prod",
          serviceIdentifier: "your_identifier",

Example (NPM):

import { init } from "privo-age-estimation-sdk";

await init({
  env: "prod",
  serviceIdentifier: "your_identifier",