How to use api or other to manage ban/unban

Hello,

I do not know if my topic will be in the right category but I put it here, thinking I am the most suitable place.

I have read and reread the different Twitch developer documentation. And I have not found any other way than IRC chat to be able to order ban and unban actions on a channel.

Is there a simpler way via API or IRC is really the only way to programmatically realize a ban or timeout?

NB: My initial need was to be able to timeout users as a personalized reward for chain points with the pub/sub event.

the only way to ban/unban a user is via a chat command.

So is via IRC no ? Or i miss something ?

Chat is chat (TMI (Twitch Messaging Interface) is available as an IRC like interface over an IRC port or a Websocket port).

Bots like Streamelement are able to timeout or ban people automatically. Am I supposed to create a bot?

Correct. You need bot code to automate handling a timeout/ban if you intend to offer this is a channel points reward.

Ohhhh ok, justa last thing…

Can i use the access_token used for pub/sub as a token for tmi authentification ?

As long as it has the correct scopes needed to perform the relevant operations yes.

You’ll need a key/token with at least these scopes

  • channel:moderate - to send ban/timeout
  • channel:read:redemptions - to read the pubsub
1 Like

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