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.
| Method | Path | Purpose |
|---|---|---|
POST | /v1/activate | Bind a machine seat; returns signed license + public key |
POST | /v1/deactivate | Release a seat |
GET | /v1/status/{licenseId}?fp= | Soft recheck (410 revoked, 403 wrong fingerprint) |
GET | /v1/apps/{slug}/public-key | App 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
| Code | Meaning |
|---|---|
| 200 | Active (and fingerprint bound if fp set) |
| 403 | Fingerprint not an active seat |
| 404 | Unknown license id |
| 410 | Revoked |
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.