Authenticate a license with JavaScript
Use fetch in a trusted server or desktop JavaScript runtime.
JavaScript
const response = await fetch(
"https://YOUR-DOMAIN/api/v1/license",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
app: "YOUR_APP_NAME",
owner_id: "YOUR_OWNER_ID",
version: "1.0",
license: licenseKey,
hwid: deviceHwid
})
}
);
const data = await response.json();For browser applications, configure cross-origin access deliberately rather than opening the API to every origin.