client.players.register(name: str, player_data: Any = None) -> PlayerRegisterResponse
Registers a new player with optional custom data. Returns player_id and private_key (the player token).
client.players.register_steam(
steam_ticket: str,
steam_identity: str | None = None,
name: str | None = None,
player_data: Any = None
) -> PlayerRegisterResponse
Registers or logs in a player via a hex-encoded Steam auth ticket from ISteamUser::GetAuthTicketForWebApi (single-use — request a fresh ticket each login). Requires Steam enabled for the project in the API cabinet; the account persists via SteamID. Response includes steam_id.
Ticket minting is out of scope for this SDK (server-side tooling and tests): game clients use the built-in Steam helpers in the Unity/.NET/C++ SDKs.
client.players.authenticate(player_token: str, data_cls: type | None = None) -> PlayerAuthResponse
Authenticates a player using their private token. Pass a dataclass as data_cls to deserialize player.player_data into it.
client.games.get_all_players() -> PlayerListResponse
Retrieves a list of all players (requires private API token).
client.players.heartbeat(player_token: str) -> PlayerHeartbeatResponse
Updates player heartbeat to maintain online status.
client.players.logout(player_token: str) -> PlayerLogoutResponse
Logs out a player and updates their last logout timestamp.
client.players.rename(player_token: str, new_name: str) -> PlayerRenameResponse
Renames a player (2-50 characters).
client.players.ban(player_id: int, ban_duration: BanTime, ban_reason: str | None = None) -> PlayerBanResponse
Bans a player with a BanTime duration (HOUR, DAY, WEEK, MONTH, QUARTER, YEAR, FOREVER) and optional reason. Requires private API token.
client.players.unban(player_id: int) -> PlayerUnbanResponse
Unbans a previously banned player. Requires private API token.
from multiplayer import is_banned
is_banned(response: ApiResponse) -> bool
Checks if an API response indicates the player is banned (error contains "You are banned" or ban_info is present).