Back to Licensing API

Activating a Key

WC Key Manager lets you remotely activate license keys for any product you sell via your WooCommerce store. Here’s how to do it using the Licensing API.

Activating a license key is a straightforward process. You need to send a GET/POST request to the Licensing API endpoint like this:

https://example.com?wckm-api=activate_key&key=your_license&instance=your_instance_string

Parameters

ParameterDescription
keyThe license key that you want to activate.
instanceThe 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 instance parameter is required to activate the license key. This parameter is used to identify the activation instance. You can use any unique string for this parameter. The default value for the instance 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 license has been successfully activated, the response will be:

{
  "success": true,
  "message": "Key activated successfully.",
  "instance": "mac os x - chrome",
  "activation_limit": 0,
  "activation_count": 1,
  "activation_remaining": "unlimited",
  "expires": "never",
  "order_id": 139,
  "customer_name": "Antoinette Mraz",
  "customer_email": "[email protected]",
  "checksum": "b2e33e8c52195f8198124214f9414fb2"
}

If the license 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_instanceWhen the instance 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