📖 API Documentation

Use these endpoints to integrate activation key validation into your apps.

POST /register-app

Register a new application and receive an App ID + Activation Key.

Request body (JSON):

{ "app_name": "My Cool App" }

Response:

{
  "message": "App registered",
  "app_id": "uuid-here",
  "activation_key": "raw-key-here"
}
POST /validate-key

Validate an activation key for a given App ID.

Request body (JSON):

{ "app_id": "your-app-id", "key": "the-activation-key" }

Response (valid):

{ "valid": true }

Response (invalid):

{ "valid": false, "reason": "Invalid key" }
🐍 Python Client Example
import requests

SERVER_URL = "https://activateapps.edgefront.co.ke/validate-key"
APP_ID     = "your-app-id"
KEY        = "the-activation-key"

def check_activation():
    try:
        r = requests.post(SERVER_URL, json={"app_id": APP_ID, "key": KEY}).json()
        return r.get("valid", False)
    except Exception:
        return False

if check_activation():
    print("✅ Activated — launch app")
else:
    print("❌ Invalid key — exit or prompt purchase")