pubnub webhook for a specific channel? - pubnub

I need to know the user presence when he will join only his inbound channel. as I need to take some action in my project when the action of user is join and channel is inbound.
is there any way from which my REST endpoint called when only same events occur?

PubNub Presence Web Hooks apply to all channels and cannot be configured to apply to just some channels. So you will receive join events on all channels.

Related

Is it possible to automatize my Telegram account to share messages from some channels to one?

I want to share messages from many channels in Telegram to one channel with my account inside the channel.
You can add modir_robot as admin of your output channel, then start the bot and follow setting page to add you input channels.

Is it possible to publish to a channel group in pubnub ? (Stream controller)

Is it possible in pubnub that one can publish to a channel group and receive the message to all channels that were added to channel group?
Publishing to a Channel Group
Publishing to a channel group or mulitiple channels is not a supported at this time. Using PubNub BLOCKS, you will be able to implement a pattern that would do this in a scalable fashion.
The question is...
Why not have all the clients subscribe to the same channel and publish the message once to that channel?
I'm sure you have a valid requirement here but would like to understand the details of it first.

Remove all the pubnub channels in a channel group using a single api call?

I wanted to remove all the channels with in a channel group in a single api call. it is possible ? or do we have to iterate through the list of channels ?
PubNub Channel Groups - Removing all Channels
You can do this using the remove group API (name varies per SDK). For JavaScript, the function is named channel_group_remove_group
pubnub.channel_group_remove_group({
  callback: displayCallback,
  error: displayCallback,
  channel_group: channelGroup
});
This must be called from the app that is subscribed to the channel group. In other words, it can't be called on behalf of the client by the server.
If you want to have your server add and remove channels to and from channel groups (on behalf of the clients), then the server's PubNub instance needs to be granted the manage permission (if you are using Access Manager, otherwise, anyone can do this) and just add and remove channels from those channel groups.
You can provide a list of channels to be added or removed but you do have to iterate through the channel groups that the channels need to be added to or removed from.

Get all channels associated with a PubNub subscribe key

Is it possible to get all the channels associated with a Pubnub subscribe key?
All channels that were ever created using this key?
Thanks,
You can get a list of all channels that are actively subscribed to using a Global Here Now call - http://www.pubnub.com/docs/web-javascript/presence#gobal_here_now
There is no option to get a list of channels that were "created" in the past but are not active now. Here are a couple of alternatives that could work for you.
Stream Controller (Channel Groups)
With channel groups, you can manage subscriptions to channels centrally. By assigning a channel group to each user, you can list all channels (active or inactive) that were added to their channel group. PubNub maintains the subscription list for all channel groups and here's how you will retrieve them
http://www.pubnub.com/docs/web-javascript/stream-controller#listing_channels_within_group
Presence Callbacks
PubNub allows you to specify a HTTP callback URL that is triggered when a channel becomes "active" or "inactive". This way, your server will be notified whenever a channel is "created" and you can persist that information to a database so you can query at a later time.

Calling a web service on PubNub Presence events

When using the PubNub Presence feature, is it possible to provide a HTTP callback that PubNub calls when a user joins or leaves a channel? In my case I want to call a Parse.com cloud function.
To clarify: I don't want to call the function from a client, but have the PubNub.com servers take care of it.
Calling a web service on PubNub Presence events
PubNub offers Presence "HTTP Callback" generated from PubNub.com servers. You must ask your Account Manager to enable for you; send an email to support#pubnub.com to enable. Ask for "Presence Callback Active" and "Presence Callback Inactive" settings. You'll want to setup a dev/prod key pair to point the WebHook URLs at different environments.
The HTTP callback URL that is triggered when a channel becomes active.
Webhooks are now supported for all presence events: join, leave, timeout and state-change, as well as the channel active and inactive events.
For a full explanation please read this StackOverflow about PubNub Presence Webhooks and how to get them configured for you keys.

Resources