TikTokLive
TikTokLive copied to clipboard
Passing room_id to the start method returns error from the sign API
It seems that the room_id is not being set when it is passed to the start method and the sign API returns the following:
TikTokLive.client.web.routes.fetch_sign.SignAPIError:
[SIGN_NOT_200] Failed request to Sign API with status code 401 and payload
"b'{"code":401,"error":"Validation error","detail":{"room_id":{"message":"\'room_id\' is required"}}}'".
Here is the code:
import asyncio
from TikTokLive import TikTokLiveClient
client = TikTokLiveClient(unique_id="@los.versus")
async def main():
await client.start(room_id="7357181668077833002")
if __name__ == "__main__":
asyncio.run(main())
Package Version
v6.0.4
Interrestinggggg
Try instantiating the client this way:
client = TikTokLiveClient(unique_id="@los.versus", web_kwargs={"params": {"room_id": "7357181668077833002"}})
Then, you can pass room_id to client.start() so it doesn't try to fetch it again.
This has been fixed in the more recent versions, closing!
Re-open if re-occurs.