Reference
Typed clients for Node.js, Electron, and the browser.
Official runtime SDKs with the same API (license, validate, activate, lease, verify_lease). Each one checks every response's signature and derives the same device ID.
| Language | Install | Notes |
|---|---|---|
| C++ | CMake | C++17; nothing to install on Windows, libcurl on macOS/Linux |
| C# / VB.NET / Unity | dotnet add package Atlas.Licensing | No dependencies; .NET Framework 4.6.1+ |
| Python | pip install atlas-licensing | Python 3.8+ |
| Rust | cargo add atlas-licensing | Blocking client |
| Go | go get github.com/atlasinfra/atlas-go | Standard library only |
| Java / Kotlin | cloud.atlasinfra:atlas-licensing | Java 17+, no dependencies |
| PHP | composer require atlasinfra/atlas-licensing | ext-curl, ext-sodium |
npm install @atlas/sdkWorks in Node.js 18+, Electron, and modern browsers, with full TypeScript types and no dependencies.
Uses your publishable key.
import { AtlasRuntime } from "@atlas/sdk";
const atlas = new AtlasRuntime({ publishableKey: "pk_live_..." });
await atlas.activate({ license_key, product_id, device: { id: machineId } });
await atlas.validate({ license_key, product_id, device: { id: machineId } });
await atlas.deactivate({ license_key, product_id, device_id: machineId });
await atlas.lease({ license_key, product_id, device: { id: machineId } });
await atlas.signingKey();Uses a secret key.
import { AtlasClient } from "@atlas/sdk";
const atlas = new AtlasClient({ apiKey: process.env.ATLAS_SECRET_KEY! });
const { product } = await atlas.products.create({ name: "Fieldwork Desktop" });
const { policy } = await atlas.policies.create({
product_id: product.id,
name: "Annual, 3 devices",
license_type: "timed",
duration_days: 365,
activation_limit: 3,
grace_days: 14,
default_entitlements: { plan: "pro" },
});
const issued = await atlas.licenses.create({
product_id: product.id,
policy_id: policy.id,
customer: { external_id: "cus_123", email: "jo@example.com" },
});
console.log(issued.key);
const id = issued.license.id;
await atlas.licenses.suspend(id);
await atlas.licenses.reinstate(id);
await atlas.licenses.renew(id, "2027-10-24T00:00:00Z");
await atlas.licenses.revoke(id, { reason: "chargeback" });Create and update calls send an idempotency key automatically. Pass your own, such as an order ID, to stay safe across restarts: atlas.licenses.create(input, { idempotencyKey: `order-${id}` }).
| Function | Use |
|---|---|
verifyOfflineLease(lease, options) | Check a saved offline lease. See Offline mode. |
verifyWebhook(rawBody, headers, secret) | Check a webhook request. See Webhooks. |
import { AtlasClient, AtlasError } from "@atlas/sdk";
const atlas = new AtlasClient({
apiKey,
timeoutMs: 30_000, // default
maxRetries: 2, // default; retries 429 and 5xx
});
try {
await atlas.licenses.create({ product_id: "prod_..." });
} catch (error) {
if (error instanceof AtlasError) {
console.error(error.code, error.detail, error.requestId);
}
}