Skip to content

Commit bbee10b

Browse files
committed
fix: Update license validation endpoint and parameter - Change endpoint from /licenses/validate to /licenses/verify - Change parameter from license_key to key to match API specification
1 parent 7de59d2 commit bbee10b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/com/licensechain/LicenseChainClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,12 @@ public void deleteLicense(String licenseId) throws LicenseChainException {
225225
*/
226226
public LicenseValidationResult validateLicense(String licenseKey, String appId) throws LicenseChainException {
227227
JsonObject request = new JsonObject();
228-
request.addProperty("license_key", licenseKey);
228+
// Use /licenses/verify endpoint with 'key' parameter to match API
229+
request.addProperty("key", licenseKey);
229230
if (appId != null) {
230231
request.addProperty("app_id", appId);
231232
}
232-
return post("/licenses/validate", request, LicenseValidationResult.class);
233+
return post("/licenses/verify", request, LicenseValidationResult.class);
233234
}
234235

235236
/**

0 commit comments

Comments
 (0)