Validate

This endpoint should be used to validate License Activation.

License Activations are records in the database that represent single license activation identified by private auto-increment id and public unique token that can be used to validate/activate/deactivate Licenses.

Endpoint

GET
/wp-json/dlm/v1/licenses/validate/{activation_token}

Responses

{
    "success": true,
    "data": {
        "id": 16,
        "token": "94face23474767399c106d7598685764853b49b5",
        "license_id": 33,
        "label": "My Device",
        "source": 2,
        "ip_address": "127.0.0.1",
        "user_agent": "PostmanRuntime/7.28.3",
        "meta_data": [],
        "created_at": "2021-08-28 11:05:33",
        "updated_at": null,
        "deactivated_at": null
    }
}
{
    "code": "data_error",
    "message": "License activation is deactivated.",
    "data": {
        "status": 404
    }
}

Examples

Example
use IdeoLogix\DigitalLicenseManagerClient\Service;

$api = new Service( 'http://site.com', 'ck_XXXX', 'cs_XXXX' );

$response = $api->licenses()->validate( '94face2...' );

print_r($response->get_data());
Response
Array
(
    [id] => 16
    [token] => 94face23474767399c106d7598685764853b49b5
    [license_id] => 33
    [label] => My Device
    [source] => 2
    [ip_address] => 127.0.0.1
    [user_agent] => DLM cURL Client v10
    [meta_data] => Array()
    [created_at] => 2021-08-28 06:32:40
    [updated_at] => NULL
    [deactivated_at] => NULL
)
For more details please click here.