Posting a comment on a live stream

yes.

In this example you’d have three tokens.

  • user A
  • user B
  • the bots

user A/B authing will tell the running process of the bot to connect to user A/B’s chat.

This is how the larger open access bots work (nightbot/fossabot etc)

They ask the streamer to login, to grant additional permission.
Then their backend tells the running bot process to also join the streamers chat.

So far it seems that you have been getting userA’s token and then starting a bot process using userA’s token and joining userA’s chat.
Instead of telling your bot to join userA’s chat.