TikTok-Live-Connector
TikTok-Live-Connector copied to clipboard
All events stopped working
Could you please check from your side? We get no events.
Here it also stopped working
maybe tiktok update their webcats, no event sent
Could it be that live-connector no longer works?
Seems so. Waiting for Zerody
maybe our time has come. To go to the factory
I have the same problem
Same Problem
Seems like TikTok no longer allows access to the webcast service without authentication.
Adding a valid sessionid
and the ttwid
cookie seems to fix the problem.
let tiktokChatConnection = new WebcastPushConnection('kingmohehe', {
requestHeaders: {
"Cookie": "sessionid=f6324878b8b34dbb8f86f1a2aafe5a0a; ttwid=1%7CLw5aVXrdJshrcdKNG2-zgC617ecDJ2WsxVHMymzZArQ%7C1658320010%7C03913e3ebc15cda442d9164e4f3f426544564573935abce01da09a557fa5130b;",
},
websocketHeaders: {
"Cookie": "sessionid=f6324878b8b34dbb8f86f1a2aafe5a0a; ttwid=1%7CLw5aVXrdJshrcdKNG2-zgC617ecDJ2WsxVHMymzZArQ%7C1658320010%7C03913e3ebc15cda442d9164e4f3f426544564573935abce01da09a557fa5130b;",
}
});
Can we use all the same source code? Copy Paste? Or must we generate something by our self?
Can we use all the same source code? Copy Paste? Or must we generate something by our self?
You need to extract the cookies (sessionid
and ttwid
) from your browser. The cookies mentioned in the example are invalid.
Is there not a more elegant solution here? Pre Authentication via Nodejs and extracting the sessionid? I think the problem is that when I'm live I can't watch my own stream at the same time. So it could be that my sessionid does not allow me to connect to the stream.
I think the problem is that when I'm live I can't watch my own stream at the same time. So it could be that my sessionid does not allow me to connect to the stream.
The session id is valid for all streams. You don't have to renew it every time.
Okay i test it. Thank you for your Support.
Can we use all the same source code? Copy Paste? Or must we generate something by our self?
You need to extract the cookies (
sessionid
andttwid
) from your browser. The cookies mentioned in the example are invalid.
How to obtain this data? We don't see sessionid
and ttwid
on browser's cookies
And when user has many channels? He should authorize in the browser first, extract cookies and then put them to the call? For each channels separately?
I extract the sessionid and the ttwid from my Chrome Browser and set it in the source code. But it not working.
Here too! Did not work
It's been solved. thank you
It's been solved. thank you
How? Share you cure, please
Should we change the connectionWrapper?
this.connection = new WebcastPushConnection(uniqueId, options);
this.connection = new WebcastPushConnection(uniqueId, {
requestHeaders: {
"Cookie": "sessionid=f6324878b8b34dbb8f86f1a2aafe5a0a;",
},
});
Only this here solved my problem, I didn't put the ttwid and it worked normal
this.connection = new WebcastPushConnection(uniqueId, { requestHeaders: { "Cookie": "sessionid=f6324878b8b34dbb8f86f1a2aafe5a0a;", }, });
Only this here solved my problem, I didn't put the ttwid and it worked normal
Thank you for the example. I wonder will it work for any user...
And when user has many channels? He should authorize in the browser first, extract cookies and then put them to the call? For each channels separately?
you can connect to as many streams as you want using a single session id. you don't need the session id of the streamer. just use the session of a trash account in the backend.
it works for me too
@OlegShklyarov if you scroll up you will see a complete example. without the ttwid
cookie (TikTok websocket ID) the websocket connection will fail and request polling will be used.
I just use this on a client side:
socket.connect(uniqueId, {
requestHeaders: {
"Cookie": "sessionid=7877777773c2fedf3923ce3c4;",
},
enableWebsocketUpgrade:false,
requestPollingIntervalMs: 500,
For how long is the session valid?
For how long is the session valid?
90 days
And if I will relog on that browser, session will be terminated?
And if I will relog on that browser, session will be terminated?
Simply remove the cookie from the browser and you will be able to log in again without revoking the previous cookie.
I've been trying to get it to work, but solution presented by zerody don't seem to work for me. Here's a video I made of me retrieving the sessionid and ttwid and inserting it into websocketHeaders and requestHeaders.
It is also not upgrading to websocket. Any ideas?
https://youtu.be/JvHyivp5VWs