Your Discord bot or website can ask LuaSecure whether a license is valid without running the loader in Roblox — for a /redeem command, a members area, or a support tool. This endpoint evaluates the key exactly like the loader does (script, owner account, ban, expiry, HWID) but never returns the script source.
Endpoint
POST https://api.luasecure.xyz/files/v2/externalcheck
Content-Type: application/json
Sign the request
Both sides share EXTERNAL_CHECK_SECRET (treat it like a bot token: anyone holding it can query any key, so keep it server-side only). Build an HMAC-SHA256 over the canonical message and send it as sig.
| Field | Value |
|---|---|
key | License key to check (max 256 chars). |
hwid | Device ID to compare, or empty to skip the HWID check. |
cnonce | Fresh random hex, 16–128 chars. One-time — replays inside the window are rejected. |
ctime | Unix seconds. Must be within ±300s of the server. |
sig | HMAC_SHA256(EXTERNAL_CHECK_SECRET, "LSEXT
" + key + "
" + hwid + "
" + cnonce + "
" + ctime), hex. |
Response
{
"ok": true,
"valid": true,
"code": "OK",
"hwid_match": true,
"hwid": "BOUND_HWID",
"expires_at": null,
"executions": 12,
"script": "SCRIPT_FILE_ID",
"cnonce": "ECHOED_CNONCE",
"stime": 0,
"sig": "RESPONSE_SIGNATURE"
}
The response is itself signed (sig over tag LSEXTR) so you can prove it came from LuaSecure and was not altered. Recompute it with the same secret before trusting valid. A valid key you asked about returns valid: true, code: "OK"; a real but rejected key returns valid: false with a code such as EXPIRED, BANNED, or HWID_MISMATCH.
Enable it
Set EXTERNAL_CHECK_SECRET in the server environment and redeploy. Until it is set the endpoint returns 503 NOT_CONFIGURED. Bad signatures and stale timestamps return 403 and count toward the brute-force limiter; an invalid-license verdict does not.
Lua