PubNub icon

PubNub

Interact with PubNub real-time messaging platform

Presence → Get State

AI-generated

Summary

Retrieve state data for a user on specified channels.

Inputs

  • channels — Comma-separated list of channels. Leave empty for global here now.
  • uuid — The UUID of the user. Leave empty to use the authenticated user.

Output shape

JSON object containing the user's state information per channel

Returns an empty object if no state is set; may include occupancy details if present.

Examples

Example 1: Fetch user state across multiple channels

Set operation to "Get State", provide channels like "chan1,chan2" and optionally a UUID; leave both empty to query the authenticated user's global state.

Discussion