-
Question
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To use NetLicensing PHP Client you need to add this library as dependency to your project.
Recommended NetLicensing authentication option is: API Key (needed role for Use your generated API Key number and Customer number in the PHP code snippet below: const SECURITY_MODE = \NetLicensing\Constants::APIKEY_IDENTIFICATION;
const APIKEY = 'YOUR-API-KEY';
const LICENSEE = 'CUSTOMER-NUMBER';
try {
$context = new \NetLicensing\Context();
$context->setSecurityMode(SECURITY_MODE);
$context->setApiKey(APIKEY);
$validationParameters = new \NetLicensing\ValidationParameters();
$validationResult = \NetLicensing\LicenseeService::validate($context, LICENSEE, $validationParameters);
print_r($validationResult);
} catch (Exception $exception) {
print_r($exception->getMessage()); Resulting
|
Beta Was this translation helpful? Give feedback.
To use NetLicensing PHP Client you need to add this library as dependency to your project.
For instance via,
composer.json
:Recommended NetLicensing authentication option is: API Key (needed role for
validate
endpoint isLicensee
). You can easily create an API Key viaManagement Console / Settings / API Access
Use your generated API Key number and Customer number in the PHP code snippet below: