Licensing (required)
Start here. These three calls are what make licensing work in your product.
- Activate runs once, when the customer pastes their key. It registers their device or website, which is how the plan's device limit is enforced.
- Validate answers one question: should my product unlock right now? Call it right after activation, at every launch, and about once a day. Unlock only when
validistrue. - Deactivate runs when the customer clicks Deactivate. It frees their slot so they can use the key on a new computer.
If you only build these three, your licensing works.
Activate a license on a device or website
Register one device, user or website against the license so it counts toward the plan's limit. Call it once when the customer first enters their key, then validate.
Deactivate a device or website
Free up a seat or website so the customer can use their key somewhere else. Wire it to a Deactivate button in your license screen.
Validate a license key
Check whether a license key is currently valid for your product. Call it when the customer enters their key, then again in the background about once a day (and at app launch). Unlock your product only when the response has `valid: true`.