mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Fix: Add the missing API Key on send chat calls. (#141)
This commit is contained in:
@@ -204,6 +204,8 @@ public class TikTokLiveHttpClient implements LiveHttpClient
|
|||||||
body.addProperty("sessionId", clientSettings.getSessionId());
|
body.addProperty("sessionId", clientSettings.getSessionId());
|
||||||
body.addProperty("ttTargetIdc", clientSettings.getTtTargetIdc());
|
body.addProperty("ttTargetIdc", clientSettings.getTtTargetIdc());
|
||||||
body.addProperty("roomId", roomInfo.getRoomId());
|
body.addProperty("roomId", roomInfo.getRoomId());
|
||||||
|
if (clientSettings.getApiKey() != null)
|
||||||
|
body.addProperty("apiKey", clientSettings.getApiKey());
|
||||||
var result = httpFactory.client(TIKTOK_CHAT_URL)
|
var result = httpFactory.client(TIKTOK_CHAT_URL)
|
||||||
.withHeader("Content-Type", "application/json")
|
.withHeader("Content-Type", "application/json")
|
||||||
.withBody(HttpRequest.BodyPublishers.ofString(body.toString()))
|
.withBody(HttpRequest.BodyPublishers.ofString(body.toString()))
|
||||||
|
|||||||
Reference in New Issue
Block a user