Prévu · phase 2
License API
Intégrez l'activation de clés à votre logiciel ou à votre site web. Chaque produit a sa propre clé API ; les licences sont liées à un identifiant matériel (applications de bureau) ou à un domaine (applications web).
Endpoints
POST/api/v1/licenses/activateLie une clé à un appareil (HWID) ou à un domaine lors de la première utilisation. Démarre la durée de la licence.
POST/api/v1/licenses/validateVérifie une clé à chaque lancement de l'application. Renvoie l'état, l'expiration et l'offre.
POST/api/v1/licenses/reset-hwidDélie l'appareil pour que la clé puisse servir sur une nouvelle machine (nécessite une clé Reset HWID).
Requête
POST /api/v1/licenses/validate
Authorization: Bearer <PRODUCT_API_KEY>
Content-Type: application/json
{
"key": "ARCS-7K2QM-PX9RT-4HVNA-ZD3WE",
"hwid": "b4f1c9…e02", // device fingerprint, or "domain" for websites
"version": "1.4.2"
}Réponse
200 OK
{
"valid": true,
"status": "active", // active | expired | banned | hwid_mismatch
"product": "arc-studio",
"plan": "1 Month Key",
"expiresAt": "2026-11-22T13:05:00Z",
"signature": "ed25519:…" // verify offline with the public key
}Exemple côté client
// Node / Electron example
const res = await fetch("https://your-shop.com/api/v1/licenses/validate", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: `Bearer ${PRODUCT_API_KEY}` },
body: JSON.stringify({ key, hwid: await getHwid(), version: app.getVersion() }),
});
const lic = await res.json();
if (!lic.valid) showActivationScreen(lic.status);