isaackogan / TikTokLive

Python library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE.
https://isaackogan.github.io/TikTokLive/
MIT License
858 stars 173 forks source link

TikTokLive - Patch Report for October 3rd, 2022 #75

Closed isaackogan closed 1 year ago

isaackogan commented 1 year ago

TikTokLive - Patch Report for October 3rd, 2022

As per usual, here's a brief explanation as to why the library broke and what we did to fix it.

TikTokLive works by connecting you, the user, to TikTok's internal API via Websocket. When TikTokLive and TikTok-Live-Connector came out earlier this year, TikTok were not too thrilled. They added authentication to their Webcast API to prevent users from using our projects.

Our response was to reverse-engineer their authentication. Zerody figured out how to do this, and together we hid the method behind an API, known as the "Signing API" which signs the requests and returns valid tokens. This way, TikTok would not be able to see what we were doing to reverse engineer their authentication and we could continue without them trying to block us.

Timeline of Changes

Friday, September 30th

TikTok released an update with the intention of completely stopping the library in its tracks. They essentially added a bunch of hidden checks, that, if caught in, would make our generated signatures fail. They even added checks to make it harder to see what checks they added.

Saturday, October 1st

We investigated what was going wrong. A fix wash pushed out. The fix managed to get around some issues, but was still being detected.

Sunday, October 2nd

Today, I am happy to say TikTokLive is once again operational, as is TikTok-Live-Connector.

Monday, October 3rd

TikTok are starting to block the library's usage again. We are trying out new signing methods. It may be working for you right now.

Wednesday, October 5th

We're back. Again. With the new Signing API version, we made a change to stop spammers from being able to abuse the service by no longer providing any tokens to the end-user. This way our platform cannot be misused. We've also added checks to prevent spam of the TikTok platform in general. The hope is that if TikTokLive cannot be misused, TikTok will not have incentive to put developer time towards blocking it.

Thanks for your patience throughout all of this. If TikTok don't block us again, it should be smooth sailing hereon out, for the next little while anyways.

Supporting Development

TikTokLive has always been free to use and free for Zerody and I to run. Zerody is busy with a full-time job, and I am writing my first-ever midterm in University tomorrow. We both took a lot of time to fix this, for free. Time I did not have.

As of this most recent fix, it now also costs us money to run this library, thanks to our new method of token generation.

If you enjoy this library (and perhaps even made a coin or two from it), consider supporting its development with a donation to me at https://www.paypal.me/isaackogan or, Zerody, the other developer responsible for running this project & TikTok-Live-Connector at https://www.paypal.com/paypalme/dalixz .

Keendi commented 1 year ago

@isaackogan I see that it is not working again, you know when it will work again?

ErmanSNTRK commented 1 year ago

I hope it will be resolved soon.

msTokens commented 1 year ago

ye this tiktok devs have nothing to do else anyway even if it works the rate limiting is badly im building a livestream viewers script and this is really bad, i need premium access after this is fixed i pay for it.

isaackogan commented 1 year ago

Fixed, see updated report

zerodytrash commented 1 year ago

viewerbot not working anymore please help sir

isaackogan commented 1 year ago

viewerbot not working anymore please help sir

Unfortunately, too bad L