Euler Stream's Server
Information about the Euler Stream sign server.
The sign server is the REST API responsible for generating the WebSocket URL needed for TikTokLive and its sister libraries to connect to livestream rooms and read events.
Rate Limits
To prevent spam, a dynamically calculated rate limit is in place. If you exceed the limit, you will receive an error code 429 from the API, and within TikTokLive, a SignatureRateLimitReachedException
. Fairly clearly named, it means you are requesting the API too much.
To increase your rate limits, you can sign up for a free account on the Euler Stream dashboard. This will give you a higher rate limit and allow you to use the API more frequently.
You can purchase paid plans for an even higher rate limit.
Why is the sign server closed source?
The reason we don't just give people the ability to run our sign server is that it generates tokens to TikTok's website to make requests (like making the request to get you the WebSocket URL). The nature of being able to do this means people can choose to spam TikTok with a massive number of requests.
If people knew our method, they could scrape any part of TikTok, not just the LIVE side. TikTok used to block the TikTokLive libraries because tokens were running around willy-nilly. In the interest of this library running forever, we don't give out tokens directly anymore, only the websocket URL.
This means we need the sign API to do all the token stuff behind the scenes so that there are no issues with us getting blocked. Obviously, we can't give out the code to do this, or TikTok will be forced to block it.
Since adopting this method, TikTok have not attempted to block our library since early 2022. When they were fully against it, they did so at one point twice per week.
The sign server will never be open source. If you want full control over signature and WebSocket generation, this is totally valid, and you should 100% make your own.