DEVELOPERS

Documentation

Integrate IP lookups and country controls into your application.

Server-side country blocking: SDKs and HTTP

The API supplies an approximate country. Your backend enforces an allowlist, blocklist or explicit unknown-country policy before sending protected content.

Country-blocking overview and SDK downloads

<?php
require __DIR__ . '/origooo-sdk/src/Client.php';
require __DIR__ . '/origooo-sdk/src/Policy.php';
$client = new \OrigoooSdk\Client(getenv('ORIGOOO_API_KEY'), 'https://orig.ooo');
$policy = new \OrigoooSdk\Policy(blocked: ['US', 'GB'], unknown: 'deny');
$country = null;
try {
    // Configure trusted proxy CIDRs if your app is behind a proxy.
    $ip = \OrigoooSdk\Client::clientIP($_SERVER['REMOTE_ADDR'] ?? '',
        $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '', []);
    $country = $client->lookup($ip)['country_code'] ?? null;
} catch (\Throwable $error) {
    // The policy's explicit unknown behaviour handles lookup failures.
}
if ($policy->decide($country) !== 'allow') {
    http_response_code(403);
    exit('This service is unavailable for this request.');
}
// Render your protected page only after the policy allows it.

PHP setup and framework guide →

For Python, Java, .NET or direct HTTP, open the dedicated implementation guide. Browser decision elements are for controlling your interface; use the server policy when content must not be returned.

YOUR NEXT BUILD STARTS HERE

Get your free API key.

1,000 monthly credits. No credit card required.

Account services are not connected in this preview. Explore the dashboard or download the implementation from your workspace.
Read the integration guide

Production accounts require verified email. Google OAuth and Paddle need deployment credentials.