Skip to content

Getting started ​

This takes about five minutes: create an account, describe your product, issue a license and validate it from code.

1. Create an account ​

Sign up at app.sunlicense.com. You become the Owner of a new organization. SunLicense is free during the alpha.

2. Create a product and a policy ​

In the dashboard, open Products → New product (for example "Acme Editor"). Then add a policy, the template your licenses follow:

FieldExampleMeaning
TypeSubscriptionPERPETUAL never expires, SUBSCRIPTION and TRIAL expire after duration
Max machines2How many machines one license can be active on. Empty = unlimited
Duration (days)365When licenses expire, counted from the day they are issued

3. Issue a license ​

On the product, click Issue license and enter your customer's email. You get a key like K7QX-M2PD-9HWT-R4CN. Give it to your customer; they enter it in your app.

Keys are masked

The dashboard shows keys as K7QX-XXXX-XXXX-XXXX. Use the eye button to reveal one key, or the copy button to copy it.

4. Create an API key ​

Open API keys → Create API key and copy the key (slk_…). It is shown once. Your app uses it to call the validation API; it cannot manage licenses.

5. Validate from your app ​

Install the SDK for your language and call it when your app starts:

js
import { SunLicense } from "sunlicense";

const client = new SunLicense({
  baseUrl: "https://api.sunlicense.com",
  token: process.env.SUNLICENSE_TOKEN, // your API key
});

const result = await client.validate(licenseKey, { host: machineId });
if (!result.valid) {
  // show your activation screen; result.data.code says why
}

The first validation from a machine activates it. When a license is already active on its maximum number of machines, a new machine gets TOO_MANY_MACHINES.

Next steps ​

SunLicense Cloud is in alpha.