-
Notifications
You must be signed in to change notification settings - Fork 1
First API call
Bryan Böhnke-Avan edited this page May 19, 2026
·
1 revision
This guide help you sending your first API request.
- Follow steps in Installation Guide
- Use the autoloader/loader file
- Use the following snippet:
<?php
# ... (require)
use Cryptolens_PHP_Client\Cryptolens;
use Cryptolens_PHP_Client\Key;
$c = new Cryptolens("YOUR_TOKEN", 12345, Cryptolens::CRYPTOLENS_OUTPUT_JSON);
$k = new Key($c);
# send requests
$license_key = "XXXXX-XXXXX-XXXXX-XXXXX";
$machineId = $k->getMachineId();
print_r("Key activated:" . var_dump($k->activate($license_key, $machineId)));
// or
$c->key()->activate($key, $c->key()->getMachineId());
?>