Can't connect to server with OAuth token authorization
Artracurs opened this issue · 2 comments
Artracurs commented
Actual behaviour:
First, client.say() stopped working, and now it fails to connect to the server at all. (using the standard code from "getting-started" with an OAuth token authorization).
Expected behaviour:
Error log:
[06:18] info: Connecting to irc-ws.chat.twitch.tv on port 443..
[06:18] info: Sending authentication to server..
[06:18] error: Login authentication failed
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Login authentication failed".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Configuration
- tmi.js version: 1.8.5
- Node version (if applicable): 16.15.1
- Browser and version (if applicable):
- Operating system: Ubuntu 22.04 LTS
AlcaDesign commented
How are you getting the access token that you're using? It needs to be a valid user access token with the required chat scope chat:read
for reading and the optional chat scope chat:edit
for sending.
See Twitch's guides: https://dev.twitch.tv/docs/irc/authenticate-bot
Artracurs commented
I'm sorry for the trouble!... Everything is working!