Validate license

Verify if a license is valid through its key. No API key is needed to access this endpoint.

POST
/api/v1/public/licenses/validate

Request Body

application/jsonRequired
licenseKeyRequiredstring

The license key.

deviceIdentifierRequiredstring

The identifier of the device to validate the license for.

productIdRequiredstring | string[]

The product ID of the license. Can also be an array if your app supports multiple products.

curl -X POST "https://keyforge.dev/api/v1/public/licenses/validate" \
  -H "Content-Type: application/json" \
  -d '{
    "licenseKey": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
    "deviceIdentifier": "some_device_id",
    "productId": "p_123456"
  }'

Success. The license can be valid or invalid (device and license will be null).

{
  "isValid": true,
  "device": {
    "identifier": "some_device_id",
    "name": "My computer name",
    "activationDate": "2023-05-19T18:39:33.000Z"
  },
  "license": {
    "key": "ABCDE-ABCDE-ABCDE-ABCDE-ABCDE",
    "productId": "p_123456",
    "type": "perpetual",
    "revoked": false,
    "maxDevices": 5,
    "expiresAt": null,
    "createdAt": "2023-05-19T18:39:33.000Z"
  }
}