Search code examples
slackslack-api

How can I deactivate an slack user via slash-commands?


I want to create a bot that deactivates users under some criteria. I can not find any slash command that deactivates user accounts for free slack groups. I only see the option to kick from channel.

For paid versions the following can be used:

https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.setInactive.md


Solution

  • To my knowledge there is no API methods to "kick" users automatically that works for free slack teams, so you will have to manually deactivate users you want to kick.

    As a workaround I have a small bot running on my slack teams that report daily in a special admin channel which users need to be manually deactivated. That works of course only if you have a hard criteria that you can use to can test if a user is still eligible to be member of your Slack team.