Windows App API Simulator

Back to Admin Dashboard
My Windows Application Client Device Simulator

Behavior:
- Activate Button: Activates 1st time (done key). If used again on another PC $\rightarrow$ returns aleady regisated.
- Startup Check: Returns valid key for the registered PC, or customer blocked / your expred.

API Server Response (JSON)
Awaiting call
// Click 'Activate Key Button' or 'Daily App Startup Check' above...
Windows App Code Snippet (C# .NET)
using System.Net.Http;

string key = textBoxKey.Text.Trim();
// Get motherboard or CPU serial as HWID
string hwid = GetComputerHardwareId(); 

// 1. On Activation Screen:
string url = $"http://localhost:8085/TouchWp/api.php?userkey={key}&hwid={hwid}&action=activate";

// 2. On Daily App Startup:
// string url = $"http://localhost:8085/TouchWp/api.php?userkey={key}&hwid={hwid}&action=check";

using (var client = new HttpClient()) {
    string response = await client.GetStringAsync(url);
    // Possible responses:
    // {"status":"success","message":"done key"} -> First-time activated!
    // {"status":"already_used","message":"aleady regisated"} -> Key already used on another PC!
    // {"status":"valid","message":"valid key"} -> Legitimate daily startup!
    // {"status":"blocked","message":"customer blocked"} -> Customer blocked!
    // {"status":"expired","message":"your expred"} -> License expired!
}