Token is good and username is correct, Why is login unsuccessful?

const tmi = require('tmi.js');

// Define configuration options
var opts = {
  options: { debug: true },
  identity: {
    username: 'terminatorbot6000',
    password: 'oauth:REMOVEBYMODS'
  },
  channels: [
    'op3n_signal'
  ]
};

// Create a client with our options
const client = new tmi.client(opts);

// Connect to Twitch:
client.connect().catch(console.error);

I validated the Auth token, I have an account for the bot. I did everything according to the quick start guide to the T. It just says login successful. I can give more details if needed.

This works without the username and password given, of course. But when i give set the identity section, it just says login unseccessful

  1. Never post your token publically. They are passwords. You should revoke this token and regenerate
  2. Your token doesn’t have any chat permissions, so the token is not valid to login to chat with

According to my test tool: Token Checker | Twitch API Example

image

(Client ID’s are public but tokens are not)

See Twitch Access Token Scopes | Twitch Developers you likely need/want at least chat:edit and chat:read

1 Like

Thanks for getting back so early. Quick reply!

I will try this as soon as I can, and yes I slipped my mind when posting the secret on here.

I will update this post once I try it

It says ‘invalid scope requested: chat’ when to set the scope to chat:edit and chat:read

Sounds like you have a encoding error on your oAuth URL

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.