TikTokLive icon indicating copy to clipboard operation
TikTokLive copied to clipboard

Passing room_id to the start method returns error from the sign API

Open xerovue opened this issue 1 year ago • 2 comments

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

xerovue avatar Apr 13 '24 06:04 xerovue

Interrestinggggg

isaackogan avatar Apr 18 '24 20:04 isaackogan

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.

diego-fmachado avatar Apr 26 '24 13:04 diego-fmachado

This has been fixed in the more recent versions, closing!

Re-open if re-occurs.

isaackogan avatar Sep 13 '24 22:09 isaackogan