Skip to content

Validate License ​

Check whether a license is usable, and optionally whether a given identifier is activated on it.

License problems come back as data. An unknown, inactive or expired key returns 200 with valid: false, so a client that only wants to know "should I unlock this?" reads one field.

Request ​

POST /api/index.php/v1/licensedock/licenses/validate

Parameters ​

ParameterTypeRequiredNotes
license_keystringYesThe license key. dlid is accepted as an alias
identifierstringNoIf sent, identifier_activated says whether it is activated on this license. Max 255 characters
product_idintegerRecommendedA key for another product is refused with PRODUCT_MISMATCH

Example ​

bash
curl -X POST https://yoursite.com/api/index.php/v1/licensedock/licenses/validate \
  -d "license_key=A1B2C3D4-E5F6A7B8-C9D0E1F2-A3B4C5D6" \
  -d "identifier=example.com" \
  -d "product_id=42"

Response ​

Valid license (200) ​

json
{
  "data": {
    "valid": true,
    "status": "active",
    "license_key": "A1B2C3D4-E5F6A7B8-C9D0E1F2-A3B4C5D6",
    "product": "My Extension",
    "plan": "Developer",
    "activation_type": "domain",
    "activation_limit": 5,
    "activations_used": 2,
    "expires_at": "2027-03-20T03:21:26Z",
    "identifier_activated": true
  }
}

Unknown key (200) ​

json
{
  "data": {
    "valid": false,
    "status": "invalid",
    "license_key": "A1B2C3D4-E5F6A7B8-C9D0E1F2-A3B4C5D6",
    "product": null,
    "plan": null,
    "activation_type": null,
    "activation_limit": 0,
    "activations_used": 0,
    "expires_at": null,
    "identifier_activated": false
  }
}
FieldNotes
validtrue only when status is active and the license hasn't expired
statusactive, expired, suspended, revoked, cancelled, or invalid for an unknown key. A license past its expiry date reports expired even before the scheduled task updates it
activation_limit0 means unlimited
expires_atnull for a license that doesn't expire
identifier_activatedtrue when no identifier was sent. Otherwise, whether that identifier is activated on this license

Errors ​

CodeHTTPWhen
INVALID_REQUEST400Missing license_key, or identifier over 255 characters
PRODUCT_MISMATCH403product_id was sent and the key doesn't cover it
RATE_LIMITED429Per-IP or per-key limit hit. See Rate Limiting
INTERNAL_ERROR500Unexpected server failure

Validate never returns LICENSE_INVALID or LICENSE_EXPIRED. Read valid and status.

Side Effects ​

A validate call updates last_check_at and last_check_ip and increments check_count on the license, so you can see in the admin when the customer last checked in.

This happens when no identifier is sent, or when the identifier sent is activated. A call with an identifier that isn't activated leaves those fields alone.

Joomla Extensions by Contona