Channel object

Channel is an object that refers to a single chat room.

Properties

The Channel object has the following properties:

ParameterTypeDescription
IdFSstringUnique identifier for the channel. Verify the channel ID with our validator.
ChannelDataFPubnubChatChannelDataAdditional data.
 → ChannelNameFStringDisplay name for the channel (must not be empty or consist only of whitespace characters).
 → DescriptionFStringChannel's identifier in an external system. You can use it to match id with a similar identifier from an external database.
 → CustomDataJsonFStringJSON providing custom data about the channel. Values must be scalar only; arrays or objects are not supported. Filtering App Context data through the custom property is not recommended in SDKs.
 → StatusFStringTag that lets you categorize your app channels by their current state. The tag choice is entirely up to you and depends on your use case.
 → TypeFStringTag that lets you categorize your app channels by their functional roles. The tag choice is entirely up to you and depends on your use case.
API limits

To learn about the maximum length of parameters used to set channel metadata, refer to REST API docs.

Methods

You can call the following methods on the Channel object.

Click on each method for more details.

Use case

For example, you can use the Channel object methods to:

Last updated on