Suggestion: Multiple Channels grant Mod

Hey Guys,
we, 99Damage, are a quite big community in Germany and we have about 20 Mods and more than 15 Channels. When a new guy is joining us, we have to login in every account and give him mod-rights. Is there any way to make it faster? It would be nice if bots could grant rights depended on names or user-ids.

Thanks for your help mates!

A bot cannot grant mod status. The only person who can give mod status is the streamer. A way to make it faster is to merge some accounts. What it does is let multiple people use the account. But the only problem is that only one person can stream on it at a time.

Well, we got sometimes 5-6 guys streaming simultaniously and because of ESL, we have seperate ESL-Channels. I know a Bot can’t grant mod status :confused: I thought about something like subscribing to our channels. 1 Sub, 20 Channels - so you can group Channels to grant a user mod everywhere.

A bot CAN if it logs into chat as the Broadcaster. Theres your solution.

For a close knit group like this, using broadcaster API keys with scope chat could work here.


Well, it’s pretty hard to keep the OAuth-Tokens updated. Our casters will recieve a new key when they login through the wizard in xsplit.

Create your own application for generating oAuth tokens…

Thought you can’t do this through an automated system anymore?

Do you mean they receive a new stream key when they login, or a new chat oauth token (I don’t stream or use xsplit, so I’m just not completely sure what you mean)? If you go here: and “TMI Token Gen” isn’t listed at the bottom under “Other Connections”, then you likely mean a different kind of token; in which case I’d go with what Barry is saying. You can make a bot that logs into chat separately with each streamer’s username / token pair, and performs the /mod or /unmod command.

Or if the xsplit wizard is using that application too, this is the link for creating your own application: though it might take a little bit of work to set one up. The application would only need to be created and added once, and I believe you can generate a token that doesn’t expire so you’d only need to do that once too, and then save the info in a config file for the bot.

You definitely need a new oAuth Token everytime you log in. It doesn’t matter if you login als Bot or as normal User. The stream key keeps the same. Our problem is, you can’t generate a oAuth Token by server-script - well, we still don’t have an idea how to do it.

There is no possibility for the PHP-Script to log in into to get a code, which is nessecary for us to generate the oAuth. Or did I miss something?

You want the OAuth authorization grant flow, described on this page:

Well, there is no way to send the login information via POST, because of Cross-Origin restrictions. There must be a way for the php script to login, take the code, transform zu oAuth-Code - but for 20 channels just by starting the script.

I would recommend hiring a developer to assist you, because it’s absolutely possible and is, in fact, utilized pretty widely in many sites.

Or you could give me a hint how to login without user interaction. There is no description in the API and noone got a useful answer till now for this problem.

Logging into chat with an OAuth token is well documented:

If you want to mod a user in multiple chats you would first have to generate an OAuth token for each account (see this is you want to create your own app or use my generator), store that and then connect to chat with each account and send a command to mod the user:

PRIVMSG #channel :.mod username

And this is exactly our problem. Since our casters are login through xsplit with these scopes:

With this login the oauth-token for that account will be invalid.
We need an automated system to get 27 oauth tokens WITHOUT any user interaction or login with account and password.

A user can have multiple oauth tokens, the only limitation is one per application. Therefore, I can have an oauth token for xsplit, an oauth token for nightbot, and a token for “Smatify’s auto-mod granting application” at the same time with no issues.

You can generate the oauth token as many times as you’d like. As long as that user doesn’t log out, they remain logged in with the old oauth token. If you make it retrieve a token during the connection process, this is a non issue.

Again, your problem is application design, not the available apis.

You only need to generate an OAuth token once, then can keep using the same one every time for logging into chat (the token is your password; ex. to login with an IRC bot, you might use ‘minnifutzi234’ as the username and ‘oauth:m7u1dhf6garrr39xinvwj0gy3fpkwr’ as the password).

The app only needs to be authorized once on each account also, because you can save the authorization code it gives you, and then use it for generating as many OAuth tokens as you need in the future. Then if you so desire, can use it to automatically request a new token each time using PHP (or your language of choice). Though I’m not sure why you’d want new ones each time, since this is all backend stuff being controlled by you, not through some 3rd party app, and since it greatly simplifies things to just keep using the same token.

Once you have a ‘chat_login’ scope’d OAuth token for each account, the rest can be done solely by chat commands, which means all you need is a small script that logs into each account (either sequentially, or all simultaneously) and sends the raw command PRIVMSG #channelName :/mod moderatorName (or /unmod to unmod).

And back to the TMI Chat OAuth Password Generator app. From what I can find, it sounds like the XSplit setup wizard uses its own app to authorize to your Twitch account (you can know for sure by checking which authorized apps are listed on your Twitch connections settings page), which should leave the TMI Token Gen app currently unused on the streaming accounts. It’s the app that everyone who uses Chatty or mIRC uses to get their chat login password.

Personally, I’d recommend just letting the TMI Token Gen app get the OAuth keys for you, then store each account’s OAuth token in the bot’s config file (that’s how most of us do it; it’s a pointless exercise to do it on your own for one-off projects like these).

Thanks guys for your help. After thinking about everything written here, we managed in some hours to get everything to work!

We requested the Tokens, put it in a database and now our moderators get the right which they deserve (or not :smiley: )

Closed :smile:

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