Consumer API

Desktop apps activate and soft-check licenses against this hub. Default base URL: http://127.0.0.1:5099 · ~60 req/min/IP.

Paste the prompt into an AI coding agent to wire Sianik.License.Client (or raw HTTP) with verify + limit gates.

MethodPathPurpose
POST/v1/activateBind a machine seat; returns signed license + public key
POST/v1/deactivateRelease a seat
GET/v1/status/{licenseId}?fp=Soft recheck (410 revoked, 403 wrong fingerprint)
GET/v1/apps/{slug}/public-keyApp public key PEM

Activate

POST /v1/activate
Content-Type: application/json

{
  "licenseKey": "LIGUI-DEMO-PRO-LOCAL",
  "machineFingerprint": "ABC...",
  "machineLabel": "Dev PC",
  "appVersion": "1.0.0"
}
curl -s -X POST http://127.0.0.1:5099/v1/activate -H "Content-Type: application/json" -d "{\"licenseKey\":\"LIGUI-DEMO-PRO-LOCAL\",\"machineFingerprint\":\"ABC...\",\"machineLabel\":\"Dev PC\",\"appVersion\":\"1.0.0\"}"

Success returns ok: true, a signed license (with optional limits; -1 = unlimited), and publicKeyPem. Store and verify the ECDSA P-256 signature offline; soft-recheck periodically.

Status codes

CodeMeaning
200Active (and fingerprint bound if fp set)
403Fingerprint not an active seat
404Unknown license id
410Revoked

Sianik.License.Client

using Sianik.License.Client;

using var client = new LicenseClient("http://127.0.0.1:5099");
var result = await client.ActivateAsync(new ActivateRequest {
    LicenseKey = "LIGUI-DEMO-PRO-LOCAL",
    MachineFingerprint = "…",
    MachineLabel = Environment.MachineName,
    AppVersion = "1.0.0"
});
using var ecdsa = LicenseCanonical.ImportPublicKeyPem(result.PublicKeyPem!);
LicenseCanonical.Verify(result.License!, ecdsa);

Seeded Ligui demo key: LIGUI-DEMO-PRO-LOCAL (3 activations). Free (no license) clients should enforce Free limit-profile caps.

Dev simulation · All guides