On this page

Get channel details

Fetch a specific channel's metadata with getChannel().

Requires App Context

Enable App Context for your keyset in the Admin Portal.

Method signature

This method takes the following parameters:

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

Input

* required
ParameterDescription
channelId *
Type: String
Default:
n/a
Unique channel identifier (up to 92 UTF-8 byte sequences).

Output

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

Sample code

Fetch the support channel metadata.

1chat.getChannel("support").async { result ->
2 result.onSuccess {
3 // handle success
4 }.onFailure {
5 // handle failure
6 }
7}
Last updated on