Endpoint
GET
/clientapi/game-history
Full URL: https://api.innovalogic.in/clientapi/game-history
Query Parameters
| Name | Type | Required | Description |
roomcode | string | Yes | Room identifier (e.g., Ludo_12345). |
playerid | string | No | Optional filter to one player (rarely needed). |
Success Response 200
{
"roomcode": "Ludo_12345",
"gamename": "Ludo",
"gametype": "2 Player Game",
"player1_id": "Innova_111111",
"player2_id": "Innova_222222",
"player3_id": null,
"player4_id": null,
"winner_player_id": "Innova_111111",
"losser_player_id": "Innova_222222",
"winner_playername": "Sanjay",
"looser_playername": "Opponent A"
}
Field Reference
| Field | Description |
gametype | 2 Player Game if there are exactly two unique players for that room; otherwise 4 Player Game. |
player1_id..player4_id | Unique players participating in this room (IDs only). Unused slots are null. |
winner_player_id | Player ID whose status is win. |
losser_player_id | One player with status loss (for 4-player, first loss is returned). |
winner_playername | Display name of the winner. |
looser_playername | Display name of the selected loser. |
Errors
| Status | Body | Meaning |
| 400 | {"message":"roomcode is required"} | Missing parameter. |
| 401 | {"message":"Missing API credentials"} | No auth headers sent. |
| 401 | {"message":"Invalid API key"} | Key doesn’t match. |
| 403 | {"message":"Client disabled or not found"} | Blocked/unknown client. |
| 404 | {"message":"No game history for this roomcode"} | No records. |
| 500 | {"message":"Internal Server Error"} | Unexpected error. |
Examples
cURL
curl -G "https://api.innovalogic.in/clientapi/game-history" \
--data-urlencode "roomcode=Ludo_12345" \
-H "X-Client-Id: <your-client-id>" \
-H "X-Api-Key: <your-api-key>" \
-H "Accept: application/json"
JavaScript (fetch)
const url = new URL("https://api.innovalogic.in/clientapi/game-history");
url.searchParams.set("roomcode", "Ludo_12345");
const res = await fetch(url, {
headers: {
"X-Client-Id": "",
"X-Api-Key": "",
"Accept": "application/json"
}
});
console.log(await res.json());
Python (requests)
import requests
r = requests.get(
"https://api.innovalogic.in/clientapi/game-history",
params={"roomcode":"Ludo_12345"},
headers={"X-Client-Id":"","X-Api-Key":"","Accept":"application/json"},
timeout=20
)
print(r.status_code, r.json())