IRC Oauth Generator

I am looking to create a bot that can write commands in chat such as ‘/vip [username]’. I have realized only the broadcaster can run certain commands such as /mod and /vip. This means(using tmi.js) I will need an oauth token generated for each user.
I have tried this several times using an access token of the user and an app access token(for obvious reasons this didn’t work). Looking at the tmijs oauth token generator, they are using implicit grant flow to generate a token to use. Is this token output any different than the access token from the authorization grant flow that I have used?

Here are the scopes I am using: user:read:email moderation:read channel:moderate channel:manage:redemptions channel:read:redemptions

All oAuth generators will work the same way.

As they will follow what is documented to do to generate an implicit auth token.

Personally I do not use these generators I use my own clientID and a regular oAuth token so I can auto refresh the token rather than having to have the user reauthenticate when the token dies

Do you think I am missing a scope or something else? I have tried using a regular access token from my application and it does not seem to work.

The only scope needed for vip should be channel:moderate when userID of the token = channelID of the channel you are trying to run /vip in

This works fine for me in my usage.

So check for errors

Edit: worth noting I don’t use any libraries or other peoples token generators

Okay, I’ll make sure to include that. Thank you for the help!

For any others that find this and have the same issue. When generating an oauth token for IRC, you must use the scope ‘chat:read’ in order for your bot to connect to chat. I used my pre-existing scopes used for api calls and it did not include this scope.

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