LicenseFerry licensing API and TypeScript SDK
Activate a license on a device, validate the active device online, or release its seat. Each call uses a product UUID, the customer’s key, and a stable local device ID. The same contract works with Hosted and Self-hosted.
Activate, validate, and release a seat
Use https://licenseferry.com for Hosted or your deployment’s HTTPS origin for Self-hosted. Send your destination product ID, license key, and the same activation identifier in deviceId on each request. Desktop apps can persist a random ID in the app’s data directory. Treat the license key as a private credential and keep management credentials on merchant systems.
POST /v1/licenses/activate
Content-Type: application/json
{
"productId": "d1bfb8e1-7af1-447d-954a-26319da57623",
"key": "DEMO-7F3A-284B",
"deviceId": "69237a89-d919-4c38-9ed3-5aaba61d275b"
}Handle the server result
A successful activation returns the license and activation records. Repeating activation for the same device returns that device’s existing activation. Use /v1/licenses/validate with the same payload to check current access and /v1/licenses/deactivate to release the seat. Read the error code to distinguish a rejected license from a connection failure.
Integrate a web app, plugin, or extension
Send key checks from your backend, then grant access to the signed-in customer based on the result. Store a stable, opaque identifier for each licensed account, site, or installation according to what your product counts as a seat. Use that identifier as deviceId for activate, validate, and deactivate. Test repeat checks and seat recovery in staging.
For WordPress plugins or browser extensions, check how the client talks to your backend and how it stores the installation ID. Continue to handle customer sign-in, subscription events, downloads, and updates in your own integration.
TypeScript and Electron
Download the TypeScript SDK or install it in your project with npm. The package includes its TypeScript declarations.
npm install https://licenseferry.com/downloads/licenseferry-sdk-typescript-v0.1.0.tgzimport { LicenseFerry } from "@licenseferry/sdk-typescript";
const licensing = new LicenseFerry({ baseUrl: "https://licenses.example.com" });
// Supply values from your app's product config, key input, and local device storage.
await licensing.activate({ productId, key, deviceId });
const { license } = await licensing.validate({ productId, key, deviceId });Run the Electron example
Download the Electron example and extract it. The example includes the SDK and uses a restricted IPC bridge for main-process licensing calls.
tar -xzf licenseferry-electron-v0.1.0.tar.gz
cd licenseferry-electron
npm install
export LICENSEFERRY_API_URL=https://licenses.example.com
export LICENSEFERRY_PRODUCT_ID=00000000-0000-4000-8000-000000000001
npm startUse your staging origin and a real test product UUID. In PowerShell, use $env:LICENSEFERRY_API_URL = "https://licenses.example.com" and $env:LICENSEFERRY_PRODUCT_ID = "your-test-product-uuid". Paste a disposable test key and run Activate, Validate, then Deactivate.