gotiktoklive icon indicating copy to clipboard operation
gotiktoklive copied to clipboard

TrackUser - Live Room does not working

Open kataras opened this issue 1 year ago • 3 comments

Hello @Davincible,

The source code of this repository does not work when I want to track user's live room. It gets an unexpected status code of 200 while trying to upgrade the connection from http to webscoket. However, its javascript version of it: https://github.com/zerodytrash/TikTok-Live-Connector works as expected.

I checked all the above compared with the working solution at repository: zerodytrash/TikTok-Live-Connector. Here is what I found:

The URL for the websocket connection request is the same in both solutions, except for the room ID query parameter. The working solution includes the room ID as a query parameter using the live_id key, while the non-working solution does not. This may be required by the TikTok server to establish a connection.

The headers for the websocket connection request are different in both solutions. The working solution sends a header named x-tt-webcast-chat-version with the value of chatVersion from the webcast state object, while the non-working solution does not send any headers. This may be required by the TikTok server to verify the chat version and prevent outdated clients from connecting.

I would suggest to:

  • Update the URL for the websocket connection request to include the room ID as a query parameter using the live_id key.

  • Add a header named x-tt-webcast-chat-version with the value of chatVersion from the webcast state object when connecting to the websocket server.

I have tried to make the changes but couldn't find the webcast state information, also I found that the proto types differs between these two repositories.

Could you please fix the issue? I will be glad to sponsor you as well.

kataras avatar May 14 '23 16:05 kataras

Hi @kataras,

Yes I am aware the current state is not working, there are a few additional things to implement here.

I have since focussed my efforts on a private TikTok API package that incorporates more endpoints, not publicly accessible here as it performs some extra magic.

Since you're considering sponsorship feel free to email me or message me on telegram @davincible and we can discuss the details

Davincible avatar May 14 '23 18:05 Davincible

I also tried to make this code run with node.js requests, I received the error Handshake-Msg:[auth failed], I couldn't keep trying for unknown validation rules, I had to give up golang to use

luck-xiaokun avatar Oct 06 '23 03:10 luck-xiaokun

Hi @kataras,

Yes I am aware the current state is not working, there are a few additional things to implement here.

I have since focussed my efforts on a private TikTok API package that incorporates more endpoints, not publicly accessible here as it performs some extra magic.

Since you're considering sponsorship feel free to email me or message me on telegram @Davincible and we can discuss the details

I have dispatched an email to you.

BlakeFunTeis avatar Oct 15 '23 23:10 BlakeFunTeis