Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

The node performs server-side operations on Stream Chat channels, specifically allowing you to update channel details. This includes modifying properties such as the channel's name, image, description, and custom metadata. It is useful in scenarios where you need to programmatically manage or maintain chat channels within your application, for example:

  • Renaming a team channel after a rebranding.
  • Updating the channel image to reflect new branding or event themes.
  • Adding or changing custom metadata to store additional information about the channel.

This operation helps keep channel data current without manual intervention in the Stream Chat dashboard.

Properties

Name Meaning
Channel Type The type of the channel. Common options include: "messaging" (1-on-1 chats), "team" (group channels), "livestream" (broadcast channels).
Channel ID Unique identifier for the channel (e.g., "general", "random", "team-alpha"). Combined with type to form the full channel ID (CID). Required to specify which channel to update.
Channel Data JSON object containing the fields to update on the channel. Common fields include name, image, description, and custom metadata. Only include fields you want to change. Example: {"name": "New Channel Name", "image": "image_url"}

Output

The output is a JSON object representing the updated channel data returned from the Stream Chat API after the update operation. This typically includes the channel's current state with all its properties reflecting the changes made.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Stream Chat service.
  • The node uses the official Stream Chat server-side client library to perform operations.
  • Proper permissions must be granted to the API key to allow channel updates.

Troubleshooting

  • Common Issues:

    • Invalid or missing Channel ID or Channel Type will cause the update to fail.
    • Malformed JSON in the Channel Data property can cause parsing errors.
    • Insufficient permissions on the API key may result in authorization errors.
  • Error Messages:

    • "Unsupported operation: channel.updateChannel": Indicates the operation was not recognized; ensure the Resource is set to "Channel" and Operation to "Update".
    • Errors related to JSON parsing usually indicate invalid JSON syntax in the Channel Data field.
    • Authorization errors suggest checking the API key credentials and their permissions.
  • Resolution Tips:

    • Double-check that the Channel ID and Channel Type are correct and correspond to an existing channel.
    • Validate JSON syntax before inputting it into the Channel Data property.
    • Confirm that the API key used has the necessary rights to update channels.

Links and References

Discussion