PYTHON

Authenticate a license from Python

Send the same JSON payload with the requests library.

Python
import requests

payload = {
    "app": "YOUR_APP_NAME",
    "owner_id": "YOUR_OWNER_ID",
    "version": "1.0",
    "license": license_key,
    "hwid": device_hwid,
}

r = requests.post(
    "https://YOUR-DOMAIN/api/v1/license",
    json=payload,
    timeout=15,
)
data = r.json()

Use a timeout and handle network failures separately from license result codes.