License Verification API
If you sell on AppTrovo, your product can check a buyer's license key against AppTrovo's License Verification API during installation or at runtime. This article covers the endpoint, its parameters, the response and the edge cases to handle. For complete code samples and the installer SDK, see the License Integration Guide.
The verify endpoint
GET https://apptrovo.com/api/v1/licenses/verify
?license_key=BUYER_LICENSE_KEY
&product_slug=your-product-slug
&domain=example.com
Accept: application/json
The endpoint is public, so your installed product can call it without an API token. Requests are limited to 120 per minute per IP address. Requests over the limit get HTTP 429.

Parameters
license_key(required, up to 64 characters): the key the buyer entered.product_slug(optional): your product's slug. When you send it, a key from a different product is rejected. Ship it in your product's config so a leaked key for another item can't unlock yours. If you leave it out, the API identifies the product from the key and returns it in the response.domain(optional): the hostname the product is running on. It is lowercased, and anyhttp://,https://or trailing slash is removed.
Sending domain activates it. If the domain isn't yet active on the license and a slot is free, the API activates it as part of the check and uses up one of the buyer's slots. Always send the same form of the hostname (with or without www.) so one installation doesn't fill two slots.
The response
The API always answers with HTTP 200. Check the valid field, not the status code, so your product can tell "invalid license" apart from "cannot reach the server". A successful check looks like this:
{
"valid": true,
"license_id": 142,
"product_id": 28,
"product": { "id": 28, "slug": "your-product-slug", "name": "Your Product", "retired": false },
"license_type": "commercial",
"is_dev": false,
"edition": { "slug": "regular", "name": "Commercial License" },
"licensed_to": "Acme Corp",
"domain": "example.com",
"expires_at": null,
"support_expires_at": "2027-05-01T00:00:00+00:00",
"support_active": true,
"activations_used": 1,
"activations_limit": 2,
"failure_reason": null
}
license_type:community,commercialordeveloper. Use this field to gate Commercial-only features. Older integrations may still check forstandard, but paid licenses now returncommercial.edition: the edition's machine slug and display name. Preferlicense_typefor feature gating.product.retired:truewhen the product has been removed from the marketplace. The license still verifies, so your app can show a "no further updates" notice instead of locking the buyer out.expires_at:nullfor purchased licenses, which are perpetual. Developer test licenses expire.support_active:truewhile the license's author support period is running. It isfalsefor Community licenses and wheneversupport_expires_atisnull, which means no support period is included.activations_used/activations_limit: the number of slots in use and the license's slot limit.
Failure reasons
A failed check has no product, edition or is_dev fields, and most other values are null or 0:
{
"valid": false,
"license_id": null,
"product_id": null,
"license_type": null,
"licensed_to": null,
"domain": null,
"expires_at": null,
"support_expires_at": null,
"support_active": false,
"activations_used": 0,
"activations_limit": 0,
"failure_reason": "Invalid license key."
}
license_id and product_id are filled in when the key or product was found. failure_reason holds a message you can show to the buyer:
Product not found.: theproduct_slugdoesn't exist.Invalid license key for this product.orInvalid license key.: the key doesn't exist or belongs to another product.This license has been replaced by an upgraded license. Use the new license key from your dashboard.: the buyer upgraded from Community to Commercial and has a new key.License has been deactivated.: for example after a refund or a confirmed violation.License has expired.: only time-limited keys, such as developer licenses, can expire.This domain has been deactivated for this license.: the buyer deactivated this domain in their dashboard.All activation slots are used (2/2). Deactivate an existing domain first.- Developer-license messages when the domain is missing or isn't a local hostname.
A request without license_key fails validation instead of reaching the check. With an Accept: application/json header, it returns HTTP 422 with the validation errors.
Listing a user's own licenses
There is also an authenticated endpoint that returns the licenses owned by the account a token belongs to, 20 per page, each with its product and license_type objects:
GET https://apptrovo.com/api/v1/licenses
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
It lists licenses the token's owner holds as a buyer. It does not list licenses sold for your products. For those, use Licenses in the Author Panel.
Best practices
- Verify during installation and occasionally afterwards, not on every page load. Cache the result.
- If AppTrovo can't be reached, show a friendly retry message instead of disabling the product.
- Never ship an API token inside a product you sell. The verify endpoint doesn't need one.
- Test the whole flow with a developer or sandbox license before you submit your product.
Related articles
Was this article helpful?