I noticed that there’s an endpoint to retrieve a list of editors for a channel, but not moderators.
How would one go about retrieving a list of moderators through the API if there is no endpoint? Have to spin up an IRC bot to do /mods or whatever everytime I want to check the moderators for a channel?
There is an undocumented endpoint you could use https://tmi.twitch.tv/group/user/{channelName}/chatters which will show you the mods that are currently in chat. I don’t know if there is a way to see a list of mods that includes those not in chat at the time though.
Keep in mind though that because this is an undocumented endpoint it’s not officially support and might break/change at any time (and in recent days has had some issues).
hmm interesting… I’m looking for a way to get all moderators that are (not) in chat. Also wouldn’t be safe to use a flakey endpoint in production. Sucks.
Connect to the person’s chat, send /mods or .mods as a PRIVMSG to the chat. You’re looking for the NOTICE reply that starts with The moderators of this room are: