Node.js SDK

Node.js license key system

A dependency-free client for Node.js and Electron: check a key when your app starts, and let the SDK handle activation, signatures and the offline cache.

License checking in a few lines

const { LicenseClient } = require('./licenseClient');

const client = new LicenseClient({
  baseUrl: 'https://license.foliox.sbs',
  product: 'my-tool',
  publicKeyB64: PUBLIC_KEY, // from /api/v1/public-key
});

// activates on first run, verifies on every run after
const result = await client.check(licenseKey);
if (!result.valid) {
  throw new Error('Not licensed: ' + result.reason);
}

Get started

  1. Create a free account, add a product, and generate a key.
  2. Get the Node.js client and its full guide: Node.js SDK docs.
  3. Copy the public key from /api/v1/public-key into your app — the SDK uses it to verify every answer.
  4. Call check() with the customer’s key as shown above.

Why this SDK

  • Uses Node’s built-in crypto for Ed25519 — nothing extra to install.
  • Suits CLI tools, servers, Electron and packaged apps.
  • Pair it with the automation API to create keys from your checkout webhook.

Prefer plain HTTP? See the licensing API and the API reference. Device locking works through a hashed machine ID — here’s how.

FAQ

Node.js licensing questions

How do I add license keys to a Node.js app?

Copy the Node.js client file into your project, create a product in your dashboard, generate keys, and call check() with the customer’s key when your app starts. The SDK activates the key on first run and verifies it after that.

What happens when the customer is offline?

The client caches the last signed “valid” answer and keeps your app running for up to 72 hours. Because the cache is signed, it can’t be edited by hand.

Is the SDK free?

Yes — all SDKs are included on every plan, including Free.

Ready to license your software?

Create a free account, generate your first keys and drop in an SDK — it takes a few minutes.