JavaScript / TypeScript

Node.js 20+ or modern browsers via WebCrypto. No native dependencies.

Install

npm install @geckoguard/sdk

Quick start

import { GeckoGuardClient, LicenseDeniedError } from '@geckoguard/sdk';

const gecko = new GeckoGuardClient({
  apiKey: 'gg_live_...',
  productId: 'your-product-uuid',
});

try {
  const auth = await gecko.authorize('LICENSE-KEY-123');
  console.log('Allowed:', auth.allow);
} catch (err) {
  if (err instanceof LicenseDeniedError) {
    console.error('Denied:', err.errorCode);
    return;
  }
  throw err;
}

Configuration

new GeckoGuardClient({
  apiKey: 'gg_live_...',
  productId: 'your-product-uuid',
  baseUrl: 'https://api.geckoguard.net', // default
  signingSecret: '...',                  // enable HMAC request signing
  timeoutMs: 15_000,
});

For the full method list and endpoint reference, see the API Reference.