Examples
Minimal code samples for common integrations.
Node.js license check
A minimal fetch-based verify call. Adapt base URL and payload to your product.
verify.ts
typescriptconst res = await fetch(process.env.API_BASE + "/v1/licenses/verify", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REALDESTROYER_API_SECRET}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
licenseKey: process.env.REALDESTROYER_LICENSE_KEY,
productId: "prod_001",
}),
});
if (!res.ok) {
throw new Error("License verification failed");
}
const data = await res.json();
console.log(data.status);