Quick start

Get from zero to your first verification in under ten minutes. This guide walks through OAuth2 client setup, the authorization redirect, and reading the verification result.

1

Register a site

Sign up as a partner and register your site under Sites & API keys. You'll receive a client ID and client secret — copy the secret immediately, it's shown only once.

env
# Your merchant credentials
ONETWOVERIFY_CLIENT_ID=client_abc123...
ONETWOVERIFY_CLIENT_SECRET=secret_xyz789...
Keep secrets server-side
Never embed the client secret in your SPA or mobile bundle. Keep it on the server and have the browser initiate the authorize redirect only.
2

Add the authorize redirect

Point users at the OAuth2 authorize endpoint with a PKCE challenge. We handle the full verification flow and redirect back with an authorization code. Send the policy_required scope: the platform picks the scopes from your site's compliance settings and the user's jurisdiction. The age scope is always set by that policy — AGE_21 where the minimum age is 21+, otherwise AGE_18 — whichever age scope you request.

text
GET https://i.12verify.com/authorize
  ?client_id=$CLIENT_ID
  &response_type=code
  &scope=policy_required
  &redirect_uri=https://your.site/callback
  &state=$RANDOM_STATE
  &code_challenge=$PKCE_CHALLENGE
  &code_challenge_method=S256
redirect_uri must match what you registered
Each site has an allowlist of redirect URIs. Authorize requests pointing at any other URL are rejected — register every callback you actually use under Sites & API keys.
3

Exchange the code for a token

Server-side, exchange the authorization code with your client secret and PKCE verifier. Success returns a scoped access token.

bash
curl -X POST https://i.12verify.com/token \
  -d grant_type=authorization_code \
  -d code=$AUTH_CODE \
  -d client_id=$CLIENT_ID \
  -d client_secret=$CLIENT_SECRET \
  -d redirect_uri=https://your.site/callback \
  -d code_verifier=$PKCE_VERIFIER

# → {
#     "access_token": "...",
#     "token_type": "Bearer",
#     "expires_in": 3600,
#     "scope": "AGE_18 basic_info"
#   }
4

Read the verification result

Call /userinfo with the access token. You'll receive verification outcomes — never raw ID documents. The single field most integrations need is pass: a boolean indicating whether the user satisfied the policy your site was bound to at consent time.

json
{
  "sub": "8c0f6a52-3b7e-4d5e-9a51-2f4b7c1d9e10",
  "verifications": ["AGE_18"],
  "basic_info": { "email": "[email protected]" },
  "policy": {
    "policy_version": "2026.04.27",
    "industry": "adult_content",
    "site_types": ["adult_adultvideo"],
    "target_countries": ["nl"],
    "user_country": "nl",
    "outside_jurisdictions_policy": "default",
    "user_outside_target_countries": false,
    "blocked_by_outside_policy": false,
    "applied_jurisdictions": ["nl"],
    "min_age_required": 18,
    "verification_required": false,
    "methods_allowed": [],
    "methods_required": [],
    "self_declaration_acceptable": true,
    "double_blind_required": false,
    "data_retention_forbidden": false,
    "requires_government_id": false,
    "derived_scopes": ["basic_info", "AGE_18"],
    "plain_summary": "Users must be 18+. Self-declaration is acceptable.",
    "low_confidence_jurisdictions": [],
    "jurisdictions_without_specific_rules": [],
    "banned_market": false,
    "methods_prohibited": [],
    "accepted_methods": [],
    "min_age_source_jurisdictions": ["nl"],
    "dataset_hash": "<sha256>",
    "dataset_generated_at": "<timestamp>"
  },
  "verification_status": {
    "user_country": "nl",
    "user_age_known": true,
    "age_verified": true,
    "identity_verified": false,
    "location_verified": false,
    "verification_methods_used": []
  },
  "pass": true,
  "decision": {
    "passed": true,
    "reasons": [],
    "min_age_satisfied": true,
    "methods_satisfied": [],
    "methods_missing": []
  }
}
Deprecated
Client-supplied min_age is deprecated and ignored as of PIP-01: the required age is derived server-side from your site's compliance configuration and the user's jurisdiction. The min_age_required value in responses is authoritative.

Next steps