Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xerovue opened this issue Apr 13, 2024 · 2 comments
Open

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

xerovue opened this issue Apr 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@xerovue
Copy link

xerovue commented Apr 13, 2024

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

@isaackogan
Copy link
Owner

Interrestinggggg

@isaackogan isaackogan added the bug Something isn't working label Apr 18, 2024
@diego-fmachado
Copy link

diego-fmachado commented Apr 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants