This method disables a user. A disabled user can no longer log into a Slack team. Note: This method does not work on free tier. Note that you need a legacy token for this method.
Note: Slack supports an SCIM API that supports disabling and enabling a user. Note that a paid plan is required to use this interface.
This method has the URL https://slack.com/api/users.admin.setInactive
and follows the Slack Web API calling conventions.
Argument | Example | Required | Description |
---|---|---|---|
token | xxxx-xxxxxxxxx-xxxx | Required | Authentication token (Requires scope: client) |
user | U1234567890 | Required | ID of the user to be disabled |
You will receive a standard Slack API response in JSON as described here. For example if successful you get:
{
"ok": true
}
Error | Description |
---|---|
paid_only | Error message when used with a free Slack team |
user_not_found | No user could be found with that ID |