Authenticate a license from C++
A native Windows application can call the HTTPS endpoint with libcurl or another HTTP client.
C++ / libcurl
CURL* curl = curl_easy_init();
if (curl) {
const char* json = R"({
"app":"YOUR_APP_NAME",
"owner_id":"YOUR_OWNER_ID",
"version":"1.0",
"license":"YOUR_LICENSE_KEY",
"hwid":"YOUR_DEVICE_HWID"
})";
curl_easy_setopt(curl, CURLOPT_URL,
"https://YOUR-DOMAIN/api/v1/license");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json);
// Add Content-Type: application/json and capture the response.
curl_easy_perform(curl);
curl_easy_cleanup(curl);
}Validate TLS normally and avoid disabling certificate verification in production builds.