Trials and license keys for your desktop app.
Device activation, trials that end on time, and offline licenses.
Free plan · No credit card · Set up in minutes
Coding with an AI agent? Paste one prompt- .NET
- Electron
- Python
- Tauri
- C++
- Gumroad
- Lemon Squeezy
- Payhip
- Stripe
Built for how you sell.
Seats and device limits
1, 3 or 10 devices per license.
TOO_MANY_MACHINESTrials that end
Reminder email a week before it ends.
expiresAtOffline activation
A signed file, checked with your public key.
Ed25519Keys from your checkout
Gumroad, Lemon Squeezy, Payhip or Stripe; refunds revoke.
Self-service activations
Buyers free a device in your portal.
Lite & StandardSentinel spots leaked keys
Suspend a passed-around key in one click.
Lite & StandardLive before your next release.
- 1Create a free account
- 2Connect your checkout
- 3Validate on launch
// dotnet add package SunLicense
using SunLicense;
using var sl = new SunLicenseClient("https://api.sunlicense.com",
token: AppConfig.ApiKey); // slk_..., can only validate
try
{
var r = await sl.ValidateAsync(settings.LicenseKey, // AX8P-XXXX-XXXX-XXXX
new Dictionary<string, string> { ["host"] = DeviceId.Get() });
if (r.IsValid) return Activation.Ok;
return Activation.Refused(r.Body); // EXPIRED, TOO_MANY_MACHINES...
}
catch (SunLicenseException)
{
return Activation.FromOfflineFile("license.lic"); // signed, checked locally
}Questions, answered.
How do I add license key activation to a Windows app?
Install the SunLicense NuGet package (it targets .NET Standard 2.0, so WPF, WinForms and modern .NET apps can use it), create an API key that can only validate, and call ValidateAsync with the user's key and a stable device ID on launch. The first check from a new device activates it.
Can my app work offline?
Yes. Every license can be exported as a signed file that your app verifies with your organization's public key, with no network. Check online first and use the file only when SunLicense can't be reached. A file is trusted for up to 30 days, so revoking a key still reaches offline copies.
Which languages and frameworks are supported?
There are SDKs for .NET, JavaScript (Electron), Python (PyQt, PySide, Tkinter) and Java. For C++, Rust and Tauri apps, call the REST API: one HTTPS POST to /api/v1/validate with your API key, the license key and a device fingerprint.
What does it cost for a small app?
Free for one app with up to 100 licenses and 10,000 license checks a month, no credit card. Lite is $5 a month for 5 apps, 2,500 licenses, the customer portal and Sentinel; Standard is $20 a month with unlimited apps, licenses and checks.
SunLicense