Skip to content

Commit f7bef6b

Browse files
authored
Fix: Add the missing API Key on send chat calls. (#141)
1 parent d8661fa commit f7bef6b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Client/src/main/java/io/github/jwdeveloper/tiktok/TikTokLiveHttpClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ public boolean requestSendChat(LiveRoomInfo roomInfo, String content) {
204204
body.addProperty("sessionId", clientSettings.getSessionId());
205205
body.addProperty("ttTargetIdc", clientSettings.getTtTargetIdc());
206206
body.addProperty("roomId", roomInfo.getRoomId());
207+
if (clientSettings.getApiKey() != null)
208+
body.addProperty("apiKey", clientSettings.getApiKey());
207209
var result = httpFactory.client(TIKTOK_CHAT_URL)
208210
.withHeader("Content-Type", "application/json")
209211
.withBody(HttpRequest.BodyPublishers.ofString(body.toString()))

0 commit comments

Comments
 (0)