Use this page to integrate your app or website with Midasbuy System. Send POST requests with JSON bodies as described below. You receive a client API key from the operator.
This value is generated from the current site (protocol, host, and folder). After you upload to your server, open this page again — URLs will match your domain automatically. If your host uses a reverse proxy and links are wrong, set the environment variable PUBLIC_BASE_URL (e.g. https://example.com/myapp). Avoid exposing the client key in public front-end code when possible — prefer a backend that adds the header.
| Header | Value |
|---|---|
Content-Type |
application/json |
X-Api-Key required |
Client key issued to you (format like gw_...) |
POST only?action= one of the values belowFull URL example: https://www.weecard.almirsystem.cloud/gateway.php?action=getPlayer
getPlayer — player infoBody (JSON):
{"player_id": 555555555}
checkCode — UC code status{"uc_code": "YOUR_CODE"}
activate — redeem code for a player{"player_id": 555555555, "uc_code": "YOUR_CODE"}
bulkActivate — redeem up to 5 codesEach code counts as one operation against the client’s daily quota.
{"player_id": 555555555, "uc_codes": ["CODE1", "CODE2"]}
| HTTP | Meaning |
|---|---|
| 200 | Request executed; check success and data in the JSON from the upstream service |
| 400 | Unknown action or invalid body |
| 401 | Missing or invalid client API key |
| 403 | Client account disabled |
| 405 | Use POST only |
| 429 | Daily limit exceeded (per client or global cap) |
| 502 | Upstream connection failed |
| 503 | Midasbuy System is not installed or not configured on this server |
const url = "https://www.weecard.almirsystem.cloud/gateway.php?action=getPlayer";
const res = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_CLIENT_KEY"
},
body: JSON.stringify({ player_id: 555555555 })
});
const data = await res.json();
curl -X POST "https://www.weecard.almirsystem.cloud/gateway.php?action=getPlayer" ^
-H "Content-Type: application/json" ^
-H "X-Api-Key: YOUR_CLIENT_KEY" ^
-d "{\"player_id\":555555555}"
On Linux/mac, use \ for line continuation instead of ^.