Using Web API
We strongly recommend using LexActivator library for license activation. Web API should only be used for license activation, in case LexActivator library is not available for your OS.

Adding licensing to your app

After you've added a product for your app in the dashboard, go to the product page of the product you will be adding licensing to. You will need to do two things:
  • Note the product id for the product.
  • Download the 2048-bit RSA public key for the product.
RSA public key is needed to verify the signature of the activation token which you get on activating a license. Product id is the identifier of your product which is to be licensed.
In the license policies make sure fingerprintMatchingStrategy is set to "exact" as you will be using a custom fingerprint.

Activating the license key

To activate the license in your app using the license key, you need to send a POST request to the /v3/activations API endpoint. Following is a sample request which creates a license activation:
Create a license activation
On successful activation it returns an activation token. Activation token is basically a JWT and you can easily verify it's signature using any of the JWT libraries available for your language. You can then parse the JWT activation token to get the license details.

Verifying license activation

Each time, your app starts, you need to verify whether your license is already activated or not. This verification should occur locally by verifying the signature of the JWT activation token using the RSA public key.
It is recommended to store the JWT activation token in an encrypted form though not required unless you have any sensitive metadata information in the token.
You can then parse the JWT activation token to get the license details.

Syncing license activation

In order to sync the client changes with the server and vice-versa you need to frequently sent an update request. You can decide on the update frequency as per your requirement, or use the frequency interval set for the license (available in JWT activation token). If you choose latter you can control it from dashboard.
Updating a license activation