Skip to content

FetchRoomIdAPIRoute

Route to retrieve the room ID for a user

Route to retrieve the room ID for a user

class FetchRoomIdAPIRoute(ClientRoute)

Fetch user room from the API (not the same as room info)

@classmethod
async def fetch_user_room_data(web: TikTokHTTPClient, unique_id: str) -> dict
  • web (TikTokHTTPClient) — The TikTokHTTPClient client to use
  • unique_id (str) — The user to check

dict — The user’s room info

  • FailedParseRoomIdError — If TikTok returns a non-JSON or blocked response

Parse the room ID from livestream API response

@classmethod
def parse_room_id(data: dict) -> str
  • data (dict) — The data to parse

str — The user’s room id

from TikTokLive.client.web.routes.fetch_room_id_api import FetchRoomIdAPIRoute

TikTokLive/client/web/routes/fetch_room_id_api.py:9