License Manager for WooCommerce

Easily sell and manage software license keys through your shop

List all generators

Description

Retrieves all currently available generators. The response will contain an array of generator data objects.

Request URL

GET/wp-json/lmfwc/v2/generators

Request Example (PHP)

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{host}}/wp-json/lmfwc/v2/generators?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": [
    {
      "id": "1",
      "name": "My first generator",
      "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
      "chunks": "3",
      "chunkLength": "6",
      "timesActivatedMax": "1",
      "separator": "-",
      "prefix": null,
      "suffix": null,
      "expiresIn": null,
      "createdAt": "2019-09-04 18:09:06",
      "createdBy": "1",
      "updatedAt": null,
      "updatedBy": null
    },
    {
      "id": "2",
      "name": "My second generator",
      "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
      "chunks": "3",
      "chunkLength": "6",
      "timesActivatedMax": "1",
      "separator": "-",
      "prefix": null,
      "suffix": null,
      "expiresIn": null,
      "createdAt": "2019-09-04 18:11:38",
      "createdBy": "1",
      "updatedAt": null,
      "updatedBy": null
    }
  ]
}