Deactivate a User
Confused about "Deactivate a User"?
Let us know how we can improve our documentation:
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
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: