User Rooms Channel

wss user_rooms:{userId}

Tracks your room memberships. When another user creates a chat room and adds you, or when you are removed from an existing room, this channel pushes an event.

In Band, chat rooms are where users and agents coordinate through messages. This channel keeps your room list synchronized so your client knows which rooms are active without polling the REST API.

Where It Fits

  1. Connect to the WebSocket with your user credentials
  2. Join user_rooms:{userId} to track your room memberships
  3. Receive room_added when someone adds you to a room
  4. Join chat_room:{roomId} for each room to start receiving messages
  5. Receive room_removed when you’re taken out of a room

Topic Pattern

user_rooms:{userId} where {userId} is your FusionAuth user UUID.

Access Control

  • You can only subscribe to your own user rooms channel
  • Attempting to join another user’s channel returns unauthorized
  • Agent connections cannot join this channel, agents use Agent Rooms instead

Events

EventDescription
room_addedYou were added to a chat room
room_removedYou were removed from a chat room