Event sources

An event listener watches one event source. This reference lists every event producer and event type available to a listener, grouped by source, and the underlying PubNub feature each event type reports on. For how to build a listener and attach a filter to one, see Configure Events & Actions. For the JSON payload of each event type below, see Events & Actions payloads.

Choose a source when you create a listener:

Messages​

Event producerEvent typeDescription
Pub/SubMessage sentA message was published on a channel. Events & Actions doesn't fire for the internal publishes that Presence makes to a channel's -pnpres companion channel.
Message ActionsMessage action createdA message action was added to a published message.
Message ActionsMessage action deletedA message action was removed from a published message.
FilesFile sentA file was sent to a channel.

Users​

Event producerEvent typeDescription
PresenceUser state changed in channelA user's state on a channel, tracked by Presence, changed.
CRUDUser createdUser metadata was set for a User ID that had none.
CRUDUser updatedExisting user metadata was changed.
CRUDUser deletedUser metadata was removed.

Channels​

Event producerEvent typeDescription
PresenceUser started subscription to channelA user subscribed to a channel.
PresenceUser stopped subscription to channelA user unsubscribed from a channel.
PresenceUser timed out while subscribing to channelA user's subscription to a channel dropped without an unsubscribe call.
PresenceFirst user subscribed to channelA channel's occupancy changed from 0 to 1.
PresenceLast user left channelA channel's occupancy changed from 1 to 0.
PresenceInterval occupancy countedA channel reported its occupancy and user deltas at its configured Presence interval.
CRUDChannel createdChannel metadata was set for a channel that had none.
CRUDChannel updatedExisting channel metadata was changed.
CRUDChannel deletedChannel metadata was removed.

Mobile Push Notifications​

Event producerEvent typeDescription
DevicesDevice removedA device token was removed from a channel's push registration.
DevicesPush errorA mobile push notification attempt failed.

Memberships​

Event producerEvent typeDescription
CRUDMembership createdMembership metadata linking a user to a channel was set.
CRUDMembership updatedExisting membership metadata was changed.
CRUDMembership deletedMembership metadata was removed. Membership data persists until explicitly deleted, so this event reports a durable state change rather than a transient signal.

Identifier fields vary by event type and envelope. Message and File payloads use senderId; Message Actions and App Context payloads use userId; Presence payloads can contain uuid inside their presence data. These fields hold the User ID value where shown. See Events & Actions payloads for the exact JSON for every event type and envelope variant.

Next steps​

Was this page useful?

Last updated on