PubNub icon

PubNub

Interact with PubNub real-time messaging platform

Presence → Where Now

AI-generated

Summary

Discover the channels where a user is currently present

Inputs

  • uuid — The UUID of the user. Leave empty to use the authenticated user.

Output shape

a JSON object with a channels array listing the channels where the user is occupied

Returns an empty array if the user is on no channels; works with the authenticated user when uuid is omitted; only valid for the Presence resource.

Examples

Example 1: Find channels occupied by a specific user

resource: presence, operation: whereNow, uuid: user_12345

Discussion