Skip to main content
Verilock provides official SDKs for popular languages to simplify integration. Each SDK handles authentication, request formatting, error handling, and webhook signature verification out of the box.

PHP SDK

PHP 8.1+ — Composer
Installation
composer require verilock/php-sdk
Quick Start
use Verilock\VerilockClient;

$client = new VerilockClient('your_api_key_here');

// Create a verification session
$session = $client->sessions->create([
    'workflow_id'  => 'wf_abc123',
    'redirect_url' => 'https://example.com/callback',
    'reference_id' => 'user_12345',
]);

// Redirect user to the verification URL
echo $session->verification_url;

// Retrieve session result
$result = $client->sessions->get('ses_a1b2c3d4e5f6');
echo $result->status; // "approved"

Node.js SDK

Node 18+ — npm / yarn
Installation
npm install @verilock/node-sdk
Quick Start
import { Verilock } from '@verilock/node-sdk';

const client = new Verilock('your_api_key_here');

// Create a verification session
const session = await client.sessions.create({
  workflow_id:  'wf_abc123',
  redirect_url: 'https://example.com/callback',
  reference_id: 'user_12345',
});

console.log(session.verification_url);

// Retrieve session result
const result = await client.sessions.get('ses_a1b2c3d4e5f6');
console.log(result.status); // "approved"

Python SDK

Python 3.9+ — pip
Installation
pip install verilock
Quick Start
from verilock import Verilock

client = Verilock(api_key="your_api_key_here")

# Create a verification session
session = client.sessions.create(
    workflow_id="wf_abc123",
    redirect_url="https://example.com/callback",
    reference_id="user_12345",
)

print(session.verification_url)

# Retrieve session result
result = client.sessions.get("ses_a1b2c3d4e5f6")
print(result.status)  # "approved"

Using the REST API Directly

If an official SDK is not available for your language, you can use the Verilock REST API directly with any HTTP client. All you need is the ability to send JSON over HTTPS.
cURL
curl -X POST "https://verilock.io/api/v1/sessions" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "workflow_id": "wf_abc123",
    "redirect_url": "https://example.com/callback",
    "reference_id": "user_12345"
  }'
Get your API keys — API keys are managed from your dashboard. You can create multiple keys with different scopes for different environments (development, staging, production).

SDK Features

All official SDKs include:

Automatic retries

Built-in retry logic with exponential backoff for 5xx errors and rate limits.

Webhook verification

Helper methods to verify webhook signatures with timing-safe comparison.

Type safety

Typed request/response objects for IDE autocompletion and error prevention.

Error handling

Structured exceptions with access to error codes, messages, and field details.