Python SDK — Friends

Friends — client.friends

Every player gets a persistent public player_tag (e.g. "#XK4B9P2R") on register/login — share it to be found. All methods take the player token, never the private API token.

friends.list
client.friends.list(player_token: str) -> FriendListResponse

Lists friends plus incoming/outgoing requests — entries carry player_id, player_name, player_tag, is_online, steam_id, relationship.

friends.lookup_by_tag
client.friends.lookup_by_tag(player_token: str, player_tag: str) -> FriendLookupResponse

Finds a player by public tag ("#XXXXXXXX" — 8 chars, no vowels/0/1).

friends.send_request / by_tag
client.friends.send_request(player_token: str, player_id: int) -> FriendStatusResponse
client.friends.send_request_by_tag(player_token: str, player_tag: str) -> FriendStatusResponse

Sends a friend request — auto-accepts when the target already requested you.

friends.accept / decline / remove
client.friends.accept_request(player_token: str, player_id: int) -> FriendStatusResponse
client.friends.decline_request(player_token: str, player_id: int) -> FriendStatusResponse
client.friends.remove_friend(player_token: str, player_id: int) -> FriendStatusResponse

Accept or decline an incoming request; remove_friend also cancels an outgoing one.

friends.lookup_steam_friends
client.friends.lookup_steam_friends(player_token: str, steam_ids: list[str]) -> SteamFriendsLookupResponse

Maps SteamID64s to registered players — the Steam friend import list.

friends.invite_friend / get_invites
client.friends.invite_friend(player_token: str, player_id: int) -> FriendInviteResponse
client.friends.get_invites(player_token: str) -> FriendInvitesResponse

Invites a friend into your current lobby or room (kind: "matchmaking"/"room"), and lists pending invites received.

friends.accept_invite / decline_invite
client.friends.accept_invite(player_token: str, invite_id: str, player_data: Any = None) -> FriendInviteAcceptResponse
client.friends.decline_invite(player_token: str, invite_id: str) -> FriendInviteAcceptResponse

Accepting joins the lobby/room directly — the invite token bypasses password and host approval. Room invites return room_id.