Actions13
- Message Actions
- History Actions
- Presence Actions
- Channel Group Actions
Presence → Set State
AI-generatedSummary
Set presence state for one or more channels
Inputs
- channels — Comma‑separated list of channels; leave empty for global presence.
- uuid — User UUID to associate with the state; defaults to the authenticated user.
- state (required) — State object to set for the user
Output shape
object representing the PubNub presence setState API response
May include success confirmation or error details; shape depends on PubNub version.
Examples
Example 1: Update presence state for multiple channels
channels: 'general,support', uuid: 'user_456', state: '{"status":"online","role":"member"}'
Example 2: Set state on a single channel
channels: 'alerts', uuid: '', state: '{"debug":true}'