This section explains all the API endpoints that you can use to control your software usage. The following examples are in PHP, but the process is the same for all programming languages.
The API Version 3 only adds the license manager’s endpoints to WordPress’s API, and a third-party authentication plugin is required to authenticate users. The plugin JWT Authentication for WP REST API adds JWT authentication to WordPress’s API.
All the documentation examples are tested using the JWT authentication plugin previously mentioned.
Activation/Verification with a Device ID:
If you send an activation request with a valid Device ID (the Device ID that was used to activate the license key the first time), the request will return success. This feature was added to give the developers the option to allow their customers to reactivate the software after the user has deleted the app data, for example.
Let’s say you have a license key that can be used one time, and the user has activated a mobile app now the license can’t be used again, the user later deletes the app data and tries to activate the app again.
They can’t because there is no device ID associated with the license key, and the activation limit was reached.
But if you register the Device ID when you activate the license key, even after the user deletes the app data, they can activate again because, with that ID, you can confirm that it is the same user on the same device.
Activation/Verification without a Device ID:
If you don’t put a Device ID in the parameters when you send the API request, you are checking if the license key alone is valid or no.
If you put a Device ID in the parameters, you are checking if that combination of License key/Device ID is valid or no.