Skip to content

Portable Verifications (Cross-Site) ​

AgeVerif provides a Portable Verification system, automatically allowing visitors across multiple websites without requiring them to go through the age verification process again.

The Portable Verification is cryptographically signed and is automatically verified by any website running the AgeVerif Checker Script.

🀡 Who is this for?

This feature is especially useful for webmasters with multiple websites or for networks of affiliated sites that want to streamline the age verification process for their visitors.

πŸ” Privacy-first. Always.

No personal information is shared about the user or origin website. The token is single-use and valid for a limited time.

Requirements ​

Normal Flow ​

  1. A new visitor enters your Website A running AgeVerif Checker Script.

  2. They go through the verification process, guaranteeing they are an adult.

  3. The visitor clicks on a link to Website B.

    You can use the JavaScript function ageverif.redirect(url) or the data attribute <a data-agvf /> for external links.

  4. The Checker appends the Portable Verification to the URL and redirects the visitor to Website B.

    https://example.org?agvf=eyJ0eXAiOiJKV1Qi...
  5. Now on Website B, also running the Checker Script, the Portable Verification is automatically detected and validated.

  6. That's it! The visitor is now verified on both websites without having to go through the age verification process again.

Checker Script Integration ​

If you already use AgeVerif Checker on your website, you're one step away from sharing Portable Verifications to other websites.

Otherwise, please implement the Checker Script on your website and come back to this guide.

βœ… You can already receive Portable Verifications

If you are using the Checker Script, it will automatically receive and validate Portable Verifications without any additional setup.

DOM data attribute ​

You can turn any anchor element <a> into a Portable Verification link by adding the data-agvf attribute.

Doing so will automatically append the Portable Verification token to the URL when the link is clicked.

Example ​

html
<a href="https://example.org?utm_source=xyz" target="_blank" data-agvf>Visit Example</a>

The browser will open a new tab to the following URL:

http
https://example.org?utm_source=xyz&agvf=<PORTABLE_VERIFICATION>

The destination website will then handle the Portable Verification token (agvf) and auto-verify the visitor accordingly.

βœ… Works with dynamic elements added to the DOM after the initial page load.

JavaScript API ​

Handle Portable Verifications through the JavaScript API, available on the global ageverif object or window.ageverif.

πŸ” Looking for the full API?

Check out the Checker Script JavaScript API for a full list of available functions and usage examples.


redirect() ​

ts
redirect(url: string, {
  target?: string
}): void

Redirects the visitor to the specified URL, appending the Portable Verification token if available.

Can navigate in the same page or open a new tab depending on the target parameter.

πŸ”ž What if the visitor is NOT verified?

The visitor will be redirected to the specified URL as-is, without the Portable Verification.

Parameters ​

FieldTypeFormatDescription
urlstringE.g. https://example.orgThe URL to redirect to
targetstring
(optional)
E.g. _blank
Default: _self
The target window or frame for the redirection

Example ​

html
<button onclick="ageverif.redirect('https://example.org', { target: '_blank' })">Visit Example</button>

getRedirectUrl() ​

ts
async getRedirectUrl(url: string): Promise<string>

Generates a Portable Verification and appends it to the given URL, used to redirect the user accordingly.

Parameters ​

FieldTypeFormatDescription
urlstringE.g. https://example.orgThe URL to redirect to

Returns ​

A promise with the given URL appended with the Portable Verification token if available.

Example ​

ts
const url = await ageverif.getRedirectUrl('https://example.org?utm_source=xyz');
// https://example.org?utm_source=xyz&agvf=eyJ0eXAiOiJKV1Qi...

getPortableVerification() ​

ts
async getPortableVerification(): Promise<string>

Generates a Portable Verification token.

Throws an error if the visitor is not verified or if the Portable Verification cannot be generated.

Returns ​

A promise with the Portable Verification token as a string, or null if the visitor is not verified.

Example ​

ts
const token = await ageverif.getPortableVerification();
// eyJ0eXAiOiJKV1Qi...

Third Party ​

We also support and exchange age verification tokens with select third-parties.

AgeGO ​

www.agego.com

Requirements ​

Features ​

  • βœ… Receive AgeGO "Cross-Site Verification" tokens and decode them automatically
  • ❌ Cannot generate AgeGO tokens for external websites

πŸ’³ This challenge is paid

Each successful verification token exchange will incur a fee.

Check out the AgeGO documentation for more details on how to generate and send AgeGO tokens.

Last updated: