my Name is Alexander and I am the software developer for Gronkh’s Twitch channel.
It would be really, really awesome if we can get a API endpoint to receive all created bans/timeouts by our mods.
In best case the following information:
DateTime of ban/timeout created
User who has been banned/timeouted
User who has created the ban/timeout
Length (if just a timeout)
Active (True/False if it was a ban but it has been unbanned)
Having reasons would be good too. And all the same information for unbans too, or at least some way of marking a ban as reverted, e.g. as described above.
I’ve posted it in Chat because the description told me that “Feature requests, bugs, and suggestions for both the IRC interface and web APIs are welcome.”.
And yes, reasons would be also nice. I really hope the Twitch staff will integrate this API soon.
Pupose: Allows any user to check their timeout/ban against a channel - This endpoint is restricted to the current user, it checks the current users credentials against the test channel for timeout/ban status
Fields
a) Datetime of ban/timeout
b) Length of timeout (0/null for ban)
Purpose: Gets a list of all users banned/timeout (paged)
Fields (All fields related to banned/timed out user
a) UserID
b) Channel name
c) Datetime of ban/timeout creation (UTC)
d) Ban type (timeout, ban)
e) Length (0/null for ban)
(Dropped ‘Active’, this endpoint should not track historical bans IMO)
Purpose: Checks if designated user is timed out/banned, null if the user is not timed out/banned (NULL if not timedout/banned)
Fields (All fields related to banned/timed out user
a) UserID
b) Channel name
c) Datetime of ban/timeout creation (UTC)
d) Ban type (timeout, ban)
e) Length (0/null for ban)
(Dropped ‘Active’, this endpoint should not track historical bans IMO)
Input data:
a) Channel Name
b) Ban type (timeout/ban)
c) Length (If timeout, 0/null for ban)
A possible edit to the Timeout/Ban POST request would be taking a List(ban user json object) so that you can bulk ban users. Practical use for this would likely be mostly related to events? Ideally the timeout/ban endpoint could take a twitch user id, or channel name based on something like (_id=####, name=somename) [one or the other needs to be populated, not both]
Reasoning for using channel_blocks_(read|write): Currently the users ignore list uses user_blocks_(read, write) so an ignored user for a ‘channel’ is timeout/banned.
What are your use cases for an API like this? Do you imagine that you’ll be able to query every time a person has been banned? Or just the current ban? Interested in thoughts around the uses for this API.
My primary use case is to get a list of banned users for easy display/management, the POST endpoint would be to help support automod features, especially around being able to track what mod did something, and not needing to be directly in chat to be able to manage timeouts/bans in chat. Another use case would be cross client integrations, such as minecraft servers, curse voice, discord, teamspeak, etc. If you ban someone from those servers, you can create a plugin that auto posts to the twitch endpoint (if you have twitch account linking) to ban/timeout that user from chat (or unban them)
The single user unauthorized endpoint is primarily for channel transparency on what’s going on with timeouts/bans, especially for fast flowing chats (think kripp speed) where the ‘you are not allowed to talk for some # of seconds’ just vanishes in the blink of an eye.
Single user authorized is to support research efforts for (mostly) moderators, so there’s an easy way to tell if the user is actually banned, and if so, why. (Add the json response result to an app that can track bans and you have a comprehensive dashboard for mods to research if a ban is justified or not)
The full list would make retrieving the full list of bans for auto unbans after time easier, or unbans for type offenses, basically, a pardoning system for non violent offenders.