Skip to content

How to add license keys to your software ​

One guide per stack. Each starts with the short answer and the code, then the template to start from, then the details: where the key comes from, how a rejection stops the product, what happens offline and how to sell it.

Every guide works the same way underneath: your product sends its key and a machine id to POST https://api.sunlicense.com/api/v2/license/validate with an API key that can only validate. 200 means valid; 400 means rejected, and the body's code says why (EXPIRED, REVOKED, SUSPENDED, NOT_FOUND, TOO_MANY_MACHINES, TOO_MANY_IPS, BLACKLISTED). No answer at all (network error, 5xx, 429) is not a "no": keep running and try again later, or use a signed offline license.

Minecraft and Hytale ​

Discord bots ​

Apps, tools and web ​

Game servers ​

The quickest way, whatever the stack ​

Paste the agent setup prompt into Claude Code, Cursor, Codex, Copilot or another coding agent. It installs the sunlicense CLI, creates (or signs in to) your account, adds the check to your project, proves it works with a test license and tells you what it changed. More on AI assistants.

The Free plan covers a product from first line to first sales: 3 products, 100 licenses, every SDK and store integration, no credit card. Create a free account.

Send feedback

Found something broken, or have an idea? It goes straight to our board.

The first line becomes the title.
Images (optional, up to 5: paste, drop or capture)
Check each image before sending, and remove any that show something private.

We also receive this page's address and your browser version.

Ctrl Enter to send