Add session id to websocket connection to get authenticated WS as well as optional customizable type for disconnecting websocket client in various ways.

This commit is contained in:
kohlerpop1
2025-05-21 18:43:14 -04:00
parent dd2f311539
commit 7e59099793
6 changed files with 34 additions and 13 deletions

View File

@@ -199,6 +199,8 @@ public class TikTokLiveHttpClient implements LiveHttpClient
.withParam("client", "ttlive-java")
.withParam("room_id", room_id);
if (clientSettings.getSessionId() != null) // Allows receiving of all comments and Subscribe Events
builder.withParam("session_id", clientSettings.getSessionId());
if (clientSettings.getApiKey() != null)
builder.withParam("apiKey", clientSettings.getApiKey());