Secure API requests
All API requests require authentication using API tokens and player private keys. This ensures secure access to game data and player information.
Include your API token in query parameters:
?api_token=API_TOKEN
Include player token for player-specific operations:
?player_token=PLAYER_TOKEN
Some operations require your private API token:
?private_token=PRIVATE_TOKEN
Use our REST API directly from any platform or language. All endpoints return JSON responses with consistent error handling.
$ curl -X POST "/api/game_players.php/register?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"player_name": "TestPlayer",
"player_data": {
"level": 1,
"score": 0,
"inventory": ["sword", "shield"]
}
}'
{
"success": true,
"player_id": "3",
"private_key": "cf24626c48177c7459b7bbcaa86538a93913",
"player_name": "TestPlayer",
"game_id": 2
}
$ curl -X PUT "/api/game_players.php/login?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json"
{
"success": true,
"player": {
"id": 3,
"game_id": 2,
"player_name": "TestPlayer",
"player_data": {
"level": 1,
"score": 0,
"inventory": ["sword", "shield"]
},
"is_online": true,
"last_login": null,
"last_heartbeat": null,
"last_logout": null,
"created_at": "2026-03-13 09:39:06",
"updated_at": "2026-03-13 09:39:06"
}
}
$ curl -X POST "/api/game_players.php/heartbeat?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json"
{
"success": true,
"message": "Heartbeat updated",
"last_heartbeat": "2026-03-13 09:46:13"
}
$ curl -X POST "/api/game_players.php/logout?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json"
{
"success": true,
"message": "Player logged out successfully",
"last_logout": "2026-03-13 09:46:37"
}
$ curl -X PUT "/api/game_players.php/rename?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"new_name": "NewPlayerName"
}'
{
"success": true,
"message": "Player name updated successfully",
"new_name": "NewPlayerName",
"player_id": 3
}
$ curl -X GET "/api/game_players.php/list?api_token=API_TOKEN&private_token=PRIVATE_TOKEN"
{
"success": true,
"count": 3,
"players": [
{
"id": 1,
"player_name": "TestPlayer",
"is_online": true,
"last_login": null,
"last_logout": null,
"last_heartbeat": null,
"created_at": "2026-03-13 09:37:47"
},
{
"id": 3,
"player_name": "TestPlayer",
"is_online": true,
"last_login": "2026-03-13 09:40:35",
"last_logout": null,
"last_heartbeat": null,
"created_at": "2026-03-13 09:39:06"
},
{
"id": 2,
"player_name": "TestPlayer",
"is_online": true,
"last_login": null,
"last_logout": null,
"last_heartbeat": null,
"created_at": "2026-03-13 09:38:01"
}
]
}
$ curl -X GET "/api/game_data.php/game/get?api_token=API_TOKEN"
{
"success": true,
"type": "game",
"game_id": 4,
"data": {
"text": "hello world",
"game_settings": {
"difficulty": "hard",
"max_players": 10
},
"last_updated": "2025-01-13T12:00:00Z"
}
}
$ curl -X PUT "/api/game_data.php/game/update?api_token=API_TOKEN&private_token=PRIVATE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"game_settings": {
"difficulty": "hard",
"max_players": 10
},
"last_updated": "2025-01-13T12:00:00Z"
}'
{
"success": true,
"message": "Game data updated successfully",
"updated_at": "2026-01-13 14:24:23"
}
$ curl -X GET "/api/game_data.php/player/get?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"type": "player",
"player_id": 7,
"player_name": "TestPlayer",
"data": {
"level": 1,
"score": 0,
"inventory": ["sword", "shield"]
}
}
$ curl -X PUT "/api/game_data.php/player/update?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"level": 2,
"score": 100,
"inventory": ["sword", "shield", "potion"],
"last_played": "2025-01-13T12:30:00Z"
}'
{
"success": true,
"message": "Player data updated successfully",
"updated_at": "2026-01-13 14:27:10"
}
$ curl -X POST "/api/leaderboard.php?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sort_by": ["level"],
"limit": 10
}'
{
"success": true,
"leaderboard": [
{
"rank": 1,
"player_id": 33,
"player_name": "GameHost",
"player_data": {
"level": 15,
"rank": "platinum",
"role": "host",
"last_played": "2026-03-13T14:28:06.9900113Z",
"matchmaking_status": "ready"
}
},
{
"rank": 2,
"player_id": 35,
"player_name": "Player2",
"player_data": {
"level": 12,
"rank": "gold",
"role": "player"
}
},
{
"rank": 3,
"player_id": 34,
"player_name": "Player1",
"player_data": {
"level": 8,
"rank": "silver",
"role": "player"
}
},
{
"rank": 4,
"player_id": 36,
"player_name": "Player3",
"player_data": {
"level": 6,
"rank": "bronze",
"role": "player"
}
}
],
"total": 4,
"sort_by": ["level"],
"limit": 10
}
$ curl -X POST "/api/leaderboard.php?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sort_by": ["level", "score"],
"limit": 10
}'
{
"success": true,
"leaderboard": [
{
"rank": 1,
"player_id": 40,
"player_name": "TestPlayer4",
"player_data": {
"level": 20,
"score": 1000,
"inventory": []
}
},
{
"rank": 2,
"player_id": 37,
"player_name": "TestPlayer1",
"player_data": {
"level": 15,
"score": 4500,
"inventory": ["sword"]
}
},
{
"rank": 3,
"player_id": 38,
"player_name": "TestPlayer2",
"player_data": {
"level": 15,
"score": 2000,
"inventory": ["sword", "shield"]
}
},
{
"rank": 4,
"player_id": 41,
"player_name": "TestPlayer5",
"player_data": {
"level": 12,
"inventory": ["staff"]
}
},
{
"rank": 5,
"player_id": 39,
"player_name": "TestPlayer3",
"player_data": {
"level": 8,
"score": 3000,
"inventory": ["bow"]
}
}
],
"total": 5,
"sort_by": ["level", "score"],
"limit": 10
}
$ curl -X POST "/api/leaderboard.php?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sort_by": ["score", "level"],
"limit": 10
}'
{
"success": true,
"leaderboard": [
{
"rank": 1,
"player_id": 37,
"player_name": "TestPlayer1",
"player_data": {
"level": 15,
"score": 4500,
"inventory": ["sword"]
}
},
{
"rank": 2,
"player_id": 39,
"player_name": "TestPlayer3",
"player_data": {
"level": 8,
"score": 3000,
"inventory": ["bow"]
}
},
{
"rank": 3,
"player_id": 38,
"player_name": "TestPlayer2",
"player_data": {
"level": 15,
"score": 2000,
"inventory": ["sword", "shield"]
}
},
{
"rank": 4,
"player_id": 40,
"player_name": "TestPlayer4",
"player_data": {
"level": 20,
"score": 1000,
"inventory": []
}
},
{
"rank": 5,
"player_id": 41,
"player_name": "TestPlayer5",
"player_data": {
"level": 12,
"inventory": ["staff"]
}
}
],
"total": 5,
"sort_by": ["score", "level"],
"limit": 10
}
$ curl -X GET "/api/time.php?api_token=API_KEY"
{
"success": true,
"utc": "2026-03-13T14:01:49+00:00",
"timestamp": 1773410509,
"readable": "2026-03-13 14:01:49 UTC"
}
$ curl -X GET "/api/time.php?api_token=API_KEY&utc=+1"
{
"success": true,
"utc": "2026-03-13T15:04:17+00:00",
"timestamp": 1773414257,
"readable": "2026-03-13 15:04:17 UTC",
"offset": {
"offset_hours": 1,
"offset_string": "+1",
"original_utc": "2026-03-13T14:04:17+00:00",
"original_timestamp": 1773410657
}
}
$ curl -X GET "/api/time.php?api_token=API_KEY&utc=-2"
{
"success": true,
"utc": "2026-03-13T12:05:13+00:00",
"timestamp": 1773403513,
"readable": "2026-03-13 12:05:13 UTC",
"offset": {
"offset_hours": -2,
"offset_string": "-2",
"original_utc": "2026-03-13T14:05:13+00:00",
"original_timestamp": 1773410713
}
}
$ curl -X POST "/api/matchmaking.php/list?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"search": "",
"limit": 20
}'
{
"success": true,
"lobbies": [
{
"matchmaking_id": "15b2b6e5f0ba44b5eef77705d120861f",
"host_player_id": 62,
"max_players": 4,
"strict_full": 1,
"rules": {
"min_level": 10,
"rank": "gold"
},
"created_at": "2026-03-10 15:16:58",
"last_heartbeat": "2026-03-10 15:16:58",
"current_players": 1,
"host_name": "TestPlayer"
}
]
}
$ curl -X POST "/api/matchmaking.php/create?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"matchmaking_name": "My Matchmaking",
"maxPlayers": 4,
"strictFull": true,
"join_by_requests": true,
"host_switch": false,
"can_leave_room": true,
"rules": {
"min_level": 10,
"rank": "gold"
},
"player_data": {
"level": 20,
"class": "paladin",
"inventory": ["sword", "shield", "armor"]
}
}'
{
"success": true,
"matchmaking_id": "636b3ffc9b30dc9c918d8a49661df078",
"max_players": 4,
"strict_full": true,
"join_by_requests": true,
"is_host": true
}
$ curl -X POST "/api/matchmaking.php/15b2b6e5f0ba44b5eef77705d120861f/request?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"request_id": "82334acd88f0af6a1f4747bbe755263a",
"message": "Join request sent to host"
}
$ curl -X POST "/api/matchmaking.php/f4d90025b5de54e6b1a83940cffb4490/response?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "approve"
}'
{
"success": true,
"message": "Join request approved successfully",
"request_id": "f4d90025b5de54e6b1a83940cffb4490",
"action": "approve"
}
$ curl -X POST "/api/matchmaking.php/f4d90025b5de54e6b1a83940cffb4490/response?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "reject"
}'
{
"success": true,
"message": "Join request rejected successfully",
"request_id": "f4d90025b5de54e6b1a83940cffb4490",
"action": "reject"
}
$ curl "/api/matchmaking.php/f4d90025b5de54e6b1a83940cffb4490/status?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"request": {
"request_id": "f4d90025b5de54e6b1a83940cffb4490",
"matchmaking_id": "15b2b6e5f0ba44b5eef77705d120861f",
"status": "approved",
"requested_at": "2026-03-10 16:10:23",
"responded_at": "2026-03-10 16:18:43",
"responded_by": 62,
"responder_name": "TestPlayer",
"join_by_requests": true
}
}
$ curl "/api/matchmaking.php/current?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"in_matchmaking": true,
"matchmaking": {
"matchmaking_id": "636b3ffc9b30dc9c918d8a49661df078",
"is_host": true,
"max_players": 4,
"current_players": 1,
"strict_full": true,
"join_by_requests": false,
"rules": {
"min_level": 10,
"rank": "gold"
},
"joined_at": "2026-03-06 17:23:53",
"player_status": "active",
"last_heartbeat": "2026-03-06 17:23:53",
"lobby_heartbeat": "2026-03-06 17:24:37",
"is_started": false,
"started_at": null
},
"pending_requests": []
}
$ curl -X POST "/api/matchmaking.php/15b2b6e5f0ba44b5eef77705d120861f/join?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"matchmaking_id": "15b2b6e5f0ba44b5eef77705d120861f",
"message": "Successfully joined matchmaking lobby"
}
$ curl -X POST "/api/matchmaking.php/leave?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"message": "Successfully left matchmaking lobby"
}
$ curl "/api/matchmaking.php/players?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"players": [
{
"player_id": 47,
"joined_at": "2026-03-06 17:23:53",
"last_heartbeat": "2026-03-06 17:23:53",
"status": "active",
"player_name": "TestPlayer",
"seconds_since_heartbeat": 726,
"is_host": 1,
"is_local": true
},
{
"player_id": 46,
"joined_at": "2026-03-06 17:35:01",
"last_heartbeat": "2026-03-06 17:35:01",
"status": "active",
"player_name": "TestPlayer",
"seconds_since_heartbeat": 58,
"is_host": 0,
"is_local": false
}
],
"last_updated": "2026-03-06T17:35:59+00:00"
}
$ curl -X POST "/api/matchmaking.php/heartbeat?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"status": "ok"
}
$ curl -X POST "/api/matchmaking.php/remove?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"message": "Matchmaking lobby removed successfully"
}
$ curl -X POST "/api/matchmaking.php/start?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"room_id": "c899e32506d44823d486585b247eafe5",
"room_name": "Game from Matchmaking 15b2b6",
"players_transferred": 2,
"message": "Game started successfully"
}
$ curl -X POST "/api/game_room.php/create?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"room_name": "My Game Room",
"max_players": 4,
"password": "secret123",
"host_switch": false,
"can_leave_room": true,
"player_data": {
"level": 15,
"class": "warrior",
"inventory": ["sword", "shield"]
}
}'
{
"success": true,
"room_id": "dc3723848639139113ca240958ba0bf8",
"room_name": "My Game Room",
"is_host": true
}
$ curl -X POST "/api/game_room.php/list?api_token=API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"search": "",
"limit": 20
}'
{
"success": true,
"rooms": [
{
"room_id": "dc3723848639139113ca240958ba0bf8",
"room_name": "My Game Room",
"max_players": 4,
"current_players": 1,
"has_password": 1
}
]
}
$ curl -X POST "/api/game_room.php/dc3723848639139113ca240958ba0bf8/join?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "secret123"
}'
{
"success": true,
"room_id": "dc3723848639139113ca240958ba0bf8",
"message": "Successfully joined the room"
}
$ curl -X GET "/api/game_room.php/players?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"players": [
{
"player_id": "48",
"player_name": "TestPlayer",
"is_host": 1,
"is_online": 1,
"is_local": true,
"last_heartbeat": "2026-03-09 09:39:34"
},
{
"player_id": "49",
"player_name": "TestPlayer",
"is_host": 0,
"is_online": 1,
"is_local": false,
"last_heartbeat": "2026-03-09 09:44:39"
}
],
"last_updated": "2026-03-09T09:56:21+00:00"
}
$ curl -X POST "/api/game_room.php/leave?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"message": "Successfully left the room"
}
$ curl -X POST "/api/game_room.php/heartbeat?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"status": "ok"
}
$ curl -X POST "/api/game_room.php/actions?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"target_players": "host",
"action_type": "move",
"request_data": {
"x": 10,
"y": 20
}
}'
{
"success": true,
"actions_sent": 1,
"action_ids": ["1c2bbd859e36dc7d7e5e9b4f263c88ce"],
"target_players_ids": [48]
}
$ curl "/api/game_room.php/actions/poll?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"actions": [
{
"action_id": "efc5ea74e3a37e41a4f57d948cfb2538",
"action_type": "move",
"response_data": {
"success": true,
"message": "Moved successfully"
},
"status": "completed",
"target_id": 48,
"is_host": true,
"processed_at": "2026-03-13T10:15:30+00:00"
}
]
}
$ curl "/api/game_room.php/actions/pending?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"actions": [
{
"action_id": "efc5ea74e3a37e41a4f57d948cfb2538",
"player_id": 49,
"target_id": 48,
"action_type": "move",
"request_data": {
"x": 10,
"y": 20
},
"created_at": "2026-03-09 10:10:10",
"player_name": "TestPlayer",
"is_host": false
}
]
}
$ curl -X POST "/api/game_room.php/actions/1c2bbd859e36dc7d7e5e9b4f263c88ce/complete?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "completed",
"response_data": {
"success": true,
"message": "Moved successfully"
}
}'
{
"success": true,
"message": "Action completed"
}
$ curl -X POST "/api/game_room.php/updates?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"target_players": "all",
"type": "play_animation",
"data": {
"animation": "victory",
"duration": 2.0
}
}'
{
"success": true,
"updates_sent": 1,
"update_ids": ["ddb19c9d8722073762f5db33ff13712a"],
"target_players_ids": [47]
}
$ curl -X POST "/api/game_room.php/updates?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"target_players": "specific",
"target_players_ids": [47],
"type": "spawn_effect",
"data": {
"effect": "explosion",
"position": {
"x": 10,
"y": 20
}
}
}'
{
"success": true,
"updates_sent": 1,
"update_ids": ["377bfa1d4c56c3f72d9c87b0c081e6e8"],
"target_players_ids": [47]
}
$ curl -X POST "/api/game_room.php/updates/poll?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from_players": "host",
"last_update": null
}'
{
"success": true,
"updates": [
{
"update_id": "a28388775fcf9478c6926cbe44f9d3ed",
"from_player_id": "48",
"type": "play_animation",
"data": {
"animation": "victory",
"duration": 2
},
"created_at": "2026-03-09 10:51:40"
},
{
"update_id": "f26cbcdab3939b968f148edf68a9fe54",
"from_player_id": "48",
"type": "play_animation",
"data": {
"animation": "victory",
"duration": 2
},
"created_at": "2026-03-09 10:53:58"
},
{
"update_id": "374ad8d18f1a1fddf09a856d61787c5c",
"from_player_id": "48",
"type": "play_animation",
"data": {
"animation": "victory",
"duration": 2
},
"created_at": "2026-03-09 10:54:16"
}
],
"last_update": "374ad8d18f1a1fddf09a856d61787c5c"
}
$ curl -X POST "/api/game_room.php/updates/poll?api_token=API_TOKEN&player_token=PLAYER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from_players": "host",
"last_update": "a28388775fcf9478c6926cbe44f9d3ed"
}'
{
"success": true,
"updates": [
{
"update_id": "f26cbcdab3939b968f148edf68a9fe54",
"from_player_id": "48",
"type": "play_animation",
"data": {
"animation": "victory",
"duration": 2
},
"created_at": "2026-03-09 10:53:58"
}
],
"last_update": "f26cbcdab3939b968f148edf68a9fe54"
}
$ curl "/api/game_room.php/current?api_token=API_TOKEN&player_token=PLAYER_TOKEN"
{
"success": true,
"in_room": true,
"room": {
"room_id": "05f157893b1237f7699e548d045904ab",
"room_name": "Game from Matchmaking 636b3f",
"is_host": false,
"is_online": true,
"max_players": 4,
"current_players": 2,
"has_password": false,
"is_active": true,
"player_name": "TestPlayer",
"joined_at": "2026-03-06 17:50:35",
"last_heartbeat": "2026-03-06 18:02:35",
"room_created_at": "2026-03-06 17:50:35",
"room_last_activity": "2026-03-06 18:04:58"
},
"pending_actions": [],
"pending_updates": []
}
$ curl -X POST "/api/game_players.php/register?api_token=INVALID_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"player_name": "TestPlayer"
}'
{
"success": false,
"error": "Invalid API token",
"message": "Authentication failed"
}
Complete list of error responses for all API endpoints
All API endpoints return consistent error responses in JSON format. Each error includes an error message and success status.
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"API token is required", "success": false}
{"error":"Game player token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid game player token", "success": false}
{"error":"Player does not belong to this game", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"API private token is required", "success": false}
{"error":"Invalid API token or private token", "success": false}
{"error":"API token is required", "success": false}
{"error":"Game player token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player or does not belong to game", "success": false}
{"error":"Invalid endpoint", "success": false}
{"error":"Method not allowed", "success": false}
{"error":"Database error", "success": false}
{"error":"An unexpected error occurred", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Player name is required", "success": false}
{"error":"Failed to register player", "success": false}
{"error":"API token and game player token are required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid game player token", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token and game player token are required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Failed to update heartbeat", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token and game player token are required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token and game player token are required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"New name is required", "success": false}
{"error":"Player name must be between 2 and 50 characters", "success": false}
{"error":"Failed to update player name", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token and private token are required", "success": false}
{"error":"Invalid API credentials", "success": false}
{"error":"API token and private token are required", "success": false}
{"error":"Invalid API credentials", "success": false}
{"error":"player_id is required", "success": false}
{"error":"ban_duration is required (hour, day, week, month, quarter, year, forever)", "success": false}
{"error":"Invalid ban_duration. Must be one of: hour, day, week, month, quarter, year, forever", "success": false}
{"error":"Player not found or does not belong to this game", "success": false}
{"error":"API token and private token are required", "success": false}
{"error":"Invalid API credentials", "success": false}
{"error":"player_id is required", "success": false}
{"error":"Player not found or does not belong to this game", "success": false}
{"error":"Method not allowed", "success": false}
{"error":"Invalid endpoint", "success": false}
{"error":"Internal server error", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are already in a game room. Leave current room first.", "success": false}
{"error":"You cannot create a game room while in a matchmaking lobby.", "success": false}
{"error":"Failed to create room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Failed to list rooms", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are already in another room", "success": false}
{"error":"Room not found", "success": false}
{"error":"Room inactive", "success": false}
{"error":"Room is full", "success": false}
{"error":"Incorrect password", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any room", "success": false}
{"error":"You are not in this room", "success": false}
{"error":"Room not found", "success": false}
{"error":"Players are not allowed to leave this room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Player is not in any room", "success": false}
{"error":"Failed to update heartbeat", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Missing action_type", "success": false}
{"error":"request_data_json must be a string", "success": false}
{"error":"Player is not in any room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Player is not in any room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any room", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Status is required", "success": false}
{"error":"response_data_json must be a string", "success": false}
{"error":"response_data is not valid JSON", "success": false}
{"error":"Action not found or already processed", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Player is not in any room", "success": false}
{"error":"Missing required field: target_players", "success": false}
{"error":"Missing required field: type", "success": false}
{"error":"Missing required field: target_players_ids", "success": false}
{"error":"Invalid target players ids", "success": false}
{"error":"No valid target players found", "success": false}
{"error":"Invalid target players", "success": false}
{"error":"Failed to send updates", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Player is not in any room", "success": false}
{"error":"No valid source players found", "success": false}
{"error":"Invalid from players", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any game room", "success": false}
{"error":"Only host can stop game room", "success": false}
{"error":"Failed to stop game room", "success": false}
{"error":"You are banned", "success": false}
{"error":"Invalid endpoint", "success": false}
{"error":"Internal server error", "success": false}
{"error":"Method not allowed. Use POST.", "success": false}
{"error":"api_token is required", "success": false}
{"error":"Invalid or expired api_token", "success": false}
{"error":"Invalid JSON body", "success": false}
{"error":"sort_by must be a non-empty array of field names", "success": false}
{"error":"limit must be between 1 and 100", "success": false}
{"error":"No valid sort fields provided after sanitization", "success": false}
{"error":"Database error", "success": false}
{"error":"Server error", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are already in a matchmaking lobby", "success": false}
{"error":"You cannot create matchmaking while in a game room. Leave room first.", "success": false}
{"error":"Missing required field: max_players", "success": false}
{"error":"Failed to create matchmaking lobby", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Missing required parameter: matchmakingId", "success": false}
{"error":"You are already in a matchmaking lobby", "success": false}
{"error":"You already have a pending request to this matchmaking lobby", "success": false}
{"error":"Matchmaking lobby not found or already started", "success": false}
{"error":"Matchmaking lobby is full", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Missing required parameter: matchmakingId", "success": false}
{"error":"You are already in a matchmaking lobby", "success": false}
{"error":"Matchmaking lobby not found or already started", "success": false}
{"error":"This matchmaking lobby requires host approval. Use /request endpoint instead.", "success": false}
{"error":"Matchmaking lobby is full", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any matchmaking lobby", "success": false}
{"error":"Players are not allowed to leave this matchmaking lobby", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any matchmaking lobby", "success": false}
{"error":"Failed to get players", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in any matchmaking lobby", "success": false}
{"error":"Failed to update heartbeat", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in a matchmaking lobby", "success": false}
{"error":"Only host can remove matchmaking lobby", "success": false}
{"error":"Failed to remove matchmaking lobby", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Failed to get matchmaking status", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Missing required parameter: requestId", "success": false}
{"error":"Request not found or you are not the requester", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Missing required fields: requestId and action", "success": false}
{"error":"Action must be \"approve\" or \"reject\"", "success": false}
{"error":"Request not found or already processed", "success": false}
{"error":"Only the host can respond to join requests", "success": false}
{"error":"Matchmaking lobby not found or already started", "success": false}
{"error":"Matchmaking lobby is full", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in a matchmaking lobby", "success": false}
{"error":"Only host can start matchmaking", "success": false}
{"error":"Matchmaking lobby not found or already started", "success": false}
{"error":"Lobby must be full to start (strict_full enabled)", "success": false}
{"error":"You are banned", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"You are not in a matchmaking lobby", "success": false}
{"error":"Only host can stop matchmaking lobby", "success": false}
{"error":"Cannot stop matchmaking lobby after it has been started", "success": false}
{"error":"Failed to stop matchmaking lobby", "success": false}
{"error":"You are banned", "success": false}
{"error":"Invalid endpoint", "success": false}
{"error":"Internal server error", "success": false}
{"error":"API token is required", "success": false}
{"error":"Invalid API token", "success": false}
{"error":"Invalid player token", "success": false}
{"error":"Player token is required", "success": false}
{"error":"Player is not in a realtime-enabled room", "success": false}
{"error":"Failed to generate realtime token", "success": false}
{"error":"You are banned", "success": false}
{"error":"Invalid endpoint", "success": false}
{"error":"Internal server error", "success": false}
{"error":"Method not allowed", "success": false}
{"error":"API key is required", "success": false}
{"error":"Invalid API key", "success": false}
{"error":"Internal server error", "success": false}