Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The "Unban User" operation in the Moderation resource of this Stream Chat node allows you to remove a global ban on a user. This means that a previously banned user will regain access and permissions within your chat application. This operation is useful when you want to reinstate a user who was banned due to violations or other reasons, either temporarily or permanently.

Practical scenarios include:

  • Reinstating a user after reviewing their behavior or appeal.
  • Automatically unbanning users after a timeout period expires.
  • Managing user moderation dynamically through workflows.

Example: If a user was banned for spamming but later demonstrated improved behavior, you can use this operation to unban them and allow them back into the chat environment.

Properties

Name Meaning
Target User ID The unique identifier of the user to unban globally. This is the user who will have their ban removed.

Output

The output JSON contains the response from the Stream Chat API after attempting to unban the user. Typically, it includes details about the unbanned user or confirmation of the unban action. The exact structure depends on the API response but generally confirms success or provides error information if the unban failed.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential with appropriate permissions to perform moderation actions on the Stream Chat server.
  • The node must be configured with valid Stream Chat API credentials.
  • Network connectivity to the Stream Chat service is required.

Troubleshooting

  • Common issues:

    • Attempting to unban a user who is not currently banned may result in an error or no effect.
    • Invalid or missing Target User ID will cause the operation to fail.
    • Insufficient permissions in the API credentials can lead to authorization errors.
  • Error messages:

    • "Unsupported operation: moderation.unbanUser": Indicates the operation is not recognized; ensure the correct resource and operation are selected.
    • Errors related to invalid user IDs or network issues will be returned from the API and surfaced by the node.
  • Resolution tips:

    • Verify the Target User ID is correct and corresponds to a banned user.
    • Check that the API credentials have moderation rights.
    • Ensure the Stream Chat service is reachable and operational.

Links and References

Discussion