Documentation

Licenses & keys

License keys are how your users prove they paid. Generate them in the dashboard, hand them out, and your app redeems them at runtime.

A key looks like LUMEN-XXXXX-XXXXX-XXXXX-XXXXX. Create keys under Licenses in the dashboard — in bulk, with an optional duration and a subscription level.

Lifecycle

  • Unused — freshly generated, ready to hand out.
  • Used — redeemed by a user. The duration(e.g. 30 days) becomes the user's expiresAt at that moment; with no duration the license is lifetime.
  • Banned — revoked from the dashboard. The bound user can no longer log in or pass /check.

Redeeming a key

Your app redeems a key one of two ways:

  • /register — email + password + license → creates a real user account you can later log in with email/password.
  • /license— key-only login (no email/password). Good for simple “paste your key” tools.
curl
# key-only login (needs the app-session token from /init)
curl -X POST function(){throw Error("Attempted to call BASE() from the server but BASE is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")}/api/1.x/license \
  -H "Authorization: Bearer <app-session>" \
  -H "Content-Type: application/json" \
  -d '{"license":"LUMEN-XXXXX-XXXXX-XXXXX-XXXXX","hwid":"DEVICE-ID"}'

The level on the key comes from its subscription, and the first hwid seen locks the key to that device. Prefer the SDKs over raw HTTP — they handle the session and HWID for you.