Deactivate a User

LAST EDIT May 26 2021

To deactivate a user, Stream Chat exposes a deactivateUser method. This method can only be called server-side due to security concerns, so please keep this in mind when attempting to make the call.

Below is an example of how to execute the call to deactivateUser:

The response will contain an object with the user ID that was deactivated. Further, the user will no longer be able to connect to Stream Chat as an error will be thrown.

To reinstate the user as active, use the reactivateUser method by passing the users ID as a parameter: