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.
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:
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.
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.
You can then parse the JWT activation token to get the license details.
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.