Get channel details

Fetch details of a specific channel using the getChannel() method.

Requires App Context

To store data about channels, you must enable App Context for your app's keyset in the Admin Portal.

Method signature

This method takes the following parameters:

chat.getChannel(channelId: String): PNFuture<Channel?>

Input

ParameterTypeRequiredDefaultDescription
channelIdStringYesn/aUnique channel identifier (up to 92 UTF-8 byte sequences).

Output

TypeDescription
PNFuture<Channel>PNFuture containing the channel object with its metadata.

Basic usage

Fetch the support channel metadata.

chat.getChannel("support").async { result ->
result.onSuccess {
// handle success
}.onFailure {
// handle failure
}
}
Last updated on