License Manager for WooCommerce

Easily sell and manage software license keys through your shop

Validate a license

Description

Checks the current activation status of a license key. The response will contain the number of activations, the maximum activation count, and the remaining activations.

Request URL

GET/wp-json/lmfwc/v2/licenses/validate/THE-PRETENDER

Request Example (PHP)

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{host}}/wp-json/lmfwc/v2/licenses/validate/THE-PRETENDER?consumer_key={{consumer_key}}&consumer_secret={{consumer_secret}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
} ?>

Response

{
  "success": true,
  "data": {
    "timesActivated": 0,
    "timesActivatedMax": 999,
    "remainingActivations": 999
  }
}