I’m trying to make a simple twitch bot and I’m trying to use an authentication flow to get my oauth token. After getting this token, I can validate it and it returns a status 200. In the response it states my client_id.
To make sure tmi.js is not trying to connect to the server first (without any token), I’m waiting on the token with await, and this works fine.
However, when calling client.connect() on the tmi client, I get the following:
[01:09] info: Connecting to irc-ws.chat.twitch.tv on port 443…
[01:09] info: Sending authentication to server…
[01:09] error: Login unsuccessful
Does anyone know why this happens and how I can solve this?
I’m indeed using an App Access Token as I would like to have my bot act on its own rather than on my behalf. So I used the client credentials flow. Is it possible to use tmi in this way? Or does it only work for users?