developer documentation

SDK Integration

This section covers integration with Verifymy using our dedicated Software Development Kits (SDKs), which provide pre-built components and simplified methods for different programming languages.

Available SDKs

We provide SDKs for multiple languages to simplify integration:

SDK Installation Instructions

PHP

Install via Composer

				
					composer require verifymyage/oauth
				
			

composer.json

				
					{
    "require": {
        "verifymyage/oauth": "^1.0"
    }
}
				
			

ℹ️ INFO: Requirements

  • PHP 7.4 or higher
  • Composer
  • PHP cURL extension

composer.json

				
					<?php
use VerifyMyAge\OAuth\V2;
use VerifyMyAge\Countries;
use VerifyMyAge\Methods;

// Initialize the OAuth client
$oauth = new OAuthV2(
    clientID: 'your-client-id',
    clientSecret: 'your-client-secret',
    redirectURL: 'https://your-app.com/callback'
);

// Use sandbox for development
$oauth->useSandbox();

// Step 1: Generate verification URL
$verificationUrl = $oauth->getVerificationUrl([
    'country' => Countries::GB,
    'redirect_url' => 'https://your-website.com/callback'
]);

// Step 2: Exchange code for token (in your callback endpoint)
$accessToken = $oauth->exchangeCodeByToken($_GET['code']);

// Step 3: Check verification status
$user = $oauth->user($accessToken);
if ($user['age_verified']) {
    // User is verified, allow access
} else {
    // User is not verified, deny access
}
				
			
on this page
our solutions
industries
Company
resources