DEVELOPER GUIDE

Connect your app.
Keep it simple.

Create a product, issue a license, then add the client.

Download JavaScript client Open the license tester

Activate. Check. Release.

Keep one installation ID for each device. Use the customer's license key in your application's license setup.

import { createLicenseClient } from './keybridge-client.mjs';

const license = createLicenseClient({
  origin: 'https://usekeybridge.com',
  product_id: productId,
  device_id: savedInstallationId,
  key: customerLicenseKey
});

await license.activate();
const result = await license.validate();
if (!result.allowed) {
  // Keep licensed features locked.
}

// When the customer moves to another device:
await license.deactivate();

Check allowed before unlocking features. Keep keys out of URLs, logs and support messages.

HTTP API reference

Use HTTPS POST with Content-Type: application/json. No merchant credential belongs in the installed application.

{
  "product_id": "your product UUID",
  "key": "the customer license key",
  "device_id": "the saved installation ID"
}

An HTTP 200 can still deny access: check the returned valid/reason fields. On HTTP 429, wait for Retry-After. A network or server error means current access could not be confirmed; do not automatically repeat uncertain writes.

Moving existing licenses?

Preview supported Lemon Squeezy records before importing. Update your application's licensing client before cutover.

Migration guide