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
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