Skip to content

v2.3.0 — Age & Identity Verification

Choose a tag to compare

@safenestdev safenestdev released this 05 Mar 16:35
· 50 commits to main since this release
b33fd7a

What's New

Session-Based Verification

A new session-based flow for age and identity verification. The SDK creates a verification session and provides a URL — the user completes the verification (document capture, liveness checks, selfie) in a hosted web UI. Your application polls for the result.

import { Tuteliq, VerificationMode, VerificationSessionStatus } from '@tuteliq/sdk'

const tuteliq = new Tuteliq(process.env.TUTELIQ_API_KEY)

// 1. Create a session
const session = await tuteliq.createVerificationSession({
  mode: VerificationMode.AGE,
})

// 2. Open session.url in the user's browser
console.log('Verify at:', session.url)

// 3. Poll for result
const result = await tuteliq.getVerificationSession(session.session_id)
if (result.status === VerificationSessionStatus.COMPLETED) {
  console.log('Is minor:', result.age_result?.is_minor)
}

New Methods

Method Description
createVerificationSession(input) Create a session and get a verification URL
getVerificationSession(id) Poll session status and retrieve the result
cancelVerificationSession(id) Cancel an active session (no credits charged)
getAgeVerification(id) Retrieve a past age verification result
getIdentityVerification(id) Retrieve a past identity verification result

New Enums

Enum Values
VerificationMode AGE, IDENTITY
DocumentType PASSPORT, ID_CARD, DRIVERS_LICENSE
VerificationStatus VERIFIED, FAILED, NEEDS_REVIEW
VerificationSessionStatus PENDING, IN_PROGRESS, COMPLETED, FAILED, EXPIRED, CANCELLED

Interactive Demo

A new examples/verification-demo/ directory contains a self-contained web app for testing verification locally:

cd examples/verification-demo
npm install && npm start
# Open http://localhost:3456

Credits

  • Age verification: 10 credits per completed verification
  • Identity verification: 15 credits per completed verification
  • Credits are only charged when the user completes the flow

Full Changelog: v2.2.2...v2.3.0