({{, (RefLink[ChannelSubscribers, paclet:ref/ChannelSubscribers])[channel] 
gives a list of users currently subscribed to the specified channel.}, {, (RefLink[ChannelSubscribers, paclet:ref/ChannelSubscribers])[{(Subscript[channel, 1]),(Subscript[channel, 2]),…}]
gives a list of subscribed users for each of the channels (Subscript[channel, i]).}})

OpenersNotesSection(Spacer1)Details and Options

In (RefLink[ChannelSubscribers, paclet:ref/ChannelSubscribers])[channel], channel can be specified as a channel object or in any of the forms used inside (RefLink[ChannelObject, paclet:ref/ChannelObject]).

You must have execute permission on a channel to receive a list of subscribers.

OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a channel, subscribe to it, and get a subscriber list:

channel=CreateChannel["x"]

listener=ChannelListen[channel]

ChannelSubscribers[channel]

Unsubscribe:

RemoveChannelListener[listener]

The channel no longer has subscribers:

ChannelSubscribers[channel]

Delete the channel:

DeleteChannel[channel]

OpenersExampleSection1(Spacer1)Scope  (3)

Start listening on a channel and get the subscriber list by channel name:

listener=ChannelListen["one"]

ChannelSubscribers["one"]

Unsubscribe:

RemoveChannelListener[listener]

Subscriber lists for two channels:

listeners=ChannelListen/@{"one","two"}

ChannelSubscribers[{"one","two"}]

Unsubscribe:

RemoveChannelListener[listeners]

Get subscribers by (RefLink[ChannelObject, paclet:ref/ChannelObject]):

channel=ChannelObject["x"]

listener=ChannelListen[channel]

ChannelSubscribers[channel]

Unsubscribe:

RemoveChannelListener[listener]

OpenersExampleSection3(Spacer1)Applications  (2)

Create a few channels and start listening on them:

listeners=ChannelListen/@ {CreateChannel[],CreateChannel["1"]}

Find who is listening on all your channels:

ChannelSubscribers[FindChannels[All]]

Associate channels with channel users:

AssociationMap[ChannelSubscribers,FindChannels[All]]

Unsubscribe and delete the channels:

RemoveChannelListener[listeners];DeleteChannel[];

Start listening on some channels and find who is listening with you:

listeners={ChannelListen["foo"],ChannelListen["bar"]}

ChannelSubscribers[#["ChannelObject"]]&/@listeners

Stop listening:

RemoveChannelListener[]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ChannelListeners, paclet:ref/ChannelListeners])  ▪  (RefLink[FindChannels, paclet:ref/FindChannels])  ▪  (RefLink[ChannelObject, paclet:ref/ChannelObject])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Channel-Based Communication, paclet:guide/Channel-BasedCommunication])}, {▪(RefLinkPlain[Using Connected Devices, paclet:guide/UsingConnectedDevices])}})}})