Cannot login to IRC (:tmi.twitch.tv NOTICE * :Error logging in)

Hi all,

I was hoping I could get some help w/ my bot that had been logging into IRC successfully until recently. I didn’t make any code changes and was seeing a message in the logs: :tmi.twitch.tv NOTICE * :Error logging in so I figured my auth token had expired. I’ve gotten a new one, which is valid, you can see the correct scopes in the screenshot below. (The response is from https://id.twitch.tv/oauth2/validate) However, when I use the new auth token, I still get the same message. I have no idea why I’d be getting this message. I’m opening a web socket and doing the following:

const socket = new WebSocket("wss://irc-ws.chat.twitch.tv:443");

socket.addEventListener("open", () => {
  socket.send(`PASS oauth:${process.env.AUTH_TOKEN}`);
  socket.send(`NICK my_account_name`);
  socket.send(`JOIN #${channel}`);
})

I’ve also tried NICK my_bot_name as well, in case the documentation was wrong.

Any help would be GREATLY appreciated!

Your screenshot indicates you created an app access token (aka client credentials) and not a user token.

A user token (for the user you want to read/write as) is required to login

either a

  • implict
  • code flow

token is required

Thank you! I must have had an old endpoint saved in Postman and went down the wrong path. Got the correct token and I’m all set.