Fix: Add the missing API Key on send chat calls. (#141)

This commit is contained in:
Mathieu Bayou
2025-09-06 04:33:54 +01:00
committed by GitHub
parent d8661fa2e3
commit f7bef6bb31

View File

@@ -204,6 +204,8 @@ public class TikTokLiveHttpClient implements LiveHttpClient
body.addProperty("sessionId", clientSettings.getSessionId());
body.addProperty("ttTargetIdc", clientSettings.getTtTargetIdc());
body.addProperty("roomId", roomInfo.getRoomId());
if (clientSettings.getApiKey() != null)
body.addProperty("apiKey", clientSettings.getApiKey());
var result = httpFactory.client(TIKTOK_CHAT_URL)
.withHeader("Content-Type", "application/json")
.withBody(HttpRequest.BodyPublishers.ofString(body.toString()))