Back to Licensing API

Deactivating a Key

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

ParameterDescription
keyThe license key that you want to activate.
labelThe 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:

ErrorDescription
invalid_keyWhen the key is empty or invalid.
missing_labelWhen the label is empty or invalid.
invalid_productWhen the product ID provided but does not match with the key.
invalid_emailWhen the email is provided but does not match with the key.
expiredWhen the key is expired.
no_activations_leftWhen the key has reached the activation limit.

Related Docs

Scroll to Top