The community forums are in BETA and closed to the public.

API to add a channel to multiple Channel Groups

Hi There,

Is adding 1 channel to 'n' Channel Groups allowed?> Is there any API to add a channel to multiple Channel Groups?

Thanks Gaurav

Gaurav,

A channel may be present in multiple channel groups.

There is no REST API to add a channel to multiple channel groups at once. You have to call the add API multiple times:

http://pubsub.pubnub.com/v1/channel-registration/sub-key/<sub-key>/channel-group/my-channel-group1?add=mychannel
http://pubsub.pubnub.com/v1/channel-registration/sub-key/<sub-key>/channel-group/my-channel-group2?add=mychannel

Comments to this discussion are now closed!