WC Key Manager lets you easily deactivate any label of activation for a key using the Licensing API. Here’s how to do it using the Licensing API.
Deactivating a license key is a straightforward process. You need to send a GET/POST request to the Licensing API endpoint adding the label parameter like below:
https://example.com?wckm-api=deactivate_key&key=YOUR_LICENSE&label=YOUR_label_ID
Parameters
Parameter | Description |
---|---|
key | The license key that you want to activate. |
label | The unique string to reference the activation. |
product_id | (Optional) The key will automatically detect the product ID if not provided. |
email | (Optional) The email address of the user who purchased the product. |
NOTE: The label parameter is required to activate the license key. This parameter is used to identify the activation label. You can use any unique string for this parameter. The default value for the label is OS name and browser name. For example, mac os x – chrome. You can also use website URL, IP address, or any other unique string as per your requirement.
Example Response:
The response for this request will be a JSON object. If the key has been successfully deactivated, the response will be:
{
"success": true,
"message": "Key deactivated successfully.",
"label": "mac os x - chrome",
"activation_limit": 0,
"activation_count": 0,
"activation_remaining": "unlimited",
"expires": "never",
"order_id": 139,
"customer_name": "Antoinette Mraz",
"customer_email": "[email protected]",
"checksum": "bf82b4442c9d498a40f5ade4bec7c52f"
}
If the key is invalid, the response will be:
{
"success": false,
"error": "invalid_key",
"message": "Invalid key, please provide a valid key."
}
Possible errors:
Error | Description |
---|---|
invalid_key | When the key is empty or invalid. |
missing_label | When the label is empty or invalid. |
invalid_product | When the product ID provided but does not match with the key. |
invalid_email | When the email is provided but does not match with the key. |
expired | When the key is expired. |
no_activations_left | When the key has reached the activation limit. |