Skip to content

Kick Player from Game

POST
/api/players/kickFromGame/{id}

Remove active provider game sessions and clear the related session cache. Lobby login and JWTs stay valid; the player can launch a game again from the lobby.

Authorizations

Parameters

Path Parameters

id*
Typestring
Required

Responses

Kick result
JSON
{
"data": {
"terminatedSessions": 0,
"sessionVersion": 0
},
"status": null,
"timeStamp": "string"
}

Samples

cURL
curl -X POST https://api-game.kkapi.co/api/players/kickFromGame/{id}
JavaScript
fetch("https://api-game.kkapi.co/api/players/kickFromGame/{id}", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api-game.kkapi.co/api/players/kickFromGame/{id}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://api-game.kkapi.co/api/players/kickFromGame/{id}")
print(response.json())