TikTok-Live-Connector icon indicating copy to clipboard operation
TikTok-Live-Connector copied to clipboard

[BUG] 'sendMessage' not working properly

Open nullptrmachine opened this issue 1 year ago • 4 comments

Error: Failed to send chat message. Request failed with status code 403

let tiktokLiveConnection = new WebcastPushConnection(targetUsername, {
    processInitialData: false,
    sessionId: sessionID
});
tiktokLiveConnection.on('chat', data => {
  comment = data.comment;
  
  log(chalk.bold(`${data.uniqueId}`, chalk.white(': '), chalk.green(`${comment}`)));
  
  // testing
  setTimeout(() => {
    tiktokLiveConnection.sendMessage(getRandomElement(messages)).catch(err => log(error(err)));
  }, 3000);
});

However, there was cases where it did actually work and I got a lot of messages sent in sequence... There must be issue somewhere.

When I think about it, maybe the execution time needs to be synced or more cookie variables?

nullptrmachine avatar Nov 17 '23 19:11 nullptrmachine

the same issue

samarmar0vitch avatar Nov 21 '23 10:11 samarmar0vitch

same for me

Gaboros avatar Nov 29 '23 17:11 Gaboros

I got the same issue

jiangjiangdev avatar Feb 03 '24 19:02 jiangjiangdev

same here

williambastard avatar Apr 08 '24 02:04 williambastard