Delete License Key Meta

Delete License Key Meta

Table of Contents

Code Example #

$curl = curl_init();

$endpoint = '{{domain}}/wp-json/wclm/v3/delete-license-key-meta';
$parameters = array(
        // The License Key
        'license_key' => 'FFFF-FFFF-FFFF-FFFF',

        'meta_key' => 'test'
    );

curl_setopt_array($curl, array(
     CURLOPT_URL => $endpoint,
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0,
     CURLOPT_FOLLOWLOCATION => true,
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'POST',
     CURLOPT_POSTFIELDS => $parameters,
     CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
     CURLOPT_SSL_VERIFYPEER => false,
     CURLOPT_HTTPHEADER => array(
         // Authenticated user token
         'Authorization: Bearer {{User Token}}'
     )
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

API Responses #

{
    "response": {
        "result": "error",
        "code": "100",
        "message": "Invalid license key",
        "api_timestamp": 'current timestamp'
    },
    "signature": "Signature or OpenSSL error"
}
{
    "response": {
        "result": "error",
        "code": "973",
        "message": "License key meta doesn't exist",
        "api_timestamp": 'current timestamp'
    },
    "signature": "Signature or OpenSSL error"
}
{
    "response": {
        "result": "success",
        "code": "974",
        "message": "License key meta deleted",
        "api_timestamp": 'current timestamp'
    },
    "signature": "Signature or OpenSSL error"
}
{
    "response": {
        "result": "error",
        "code": "975",
        "message": "The authenticated user can't update/delete this key, admin only meta key",
        "api_timestamp": 'current timestamp'
    },
    "signature": "Signature or OpenSSL error"
}
{
    "response": {
        "result": "error",
        "code": "900",
        "message": "The authenticated user doesn't own this license key",
        "api_timestamp": 'current timestamp'
    },
    "signature": "Signature or OpenSSL error"
}

WordPress’s built-in REST API responses.

{
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
        "status": 403
    }
}

Delete License Key Meta
We use cookies for analytics. By using this website, you agree to our use of cookies.