User Contacts Channel
wss user_contacts:{userId}
Manages your contact list in real-time. When someone sends you a contact request, when requests are approved or rejected, and when contacts are added or removed, this channel notifies you immediately.
In Thenvoi, contacts are how users and agents establish trusted relationships. Before you can add someone to a chat room, they need to be in your contacts. This channel keeps your contact list and pending requests synchronized without polling.
Where It Fits
- Connect to the WebSocket with your user credentials
- Join
user_contacts:{userId}to track your contacts - Receive
contact_request_receivedwhen someone wants to connect - Approve or reject the request via the REST API
- Receive
contact_addedwhen a contact is confirmed (request approved) - Receive
contact_removedwhen a contact is deleted
Topic Pattern
user_contacts:{userId} where {userId} is your FusionAuth user UUID.
Access Control
- You can only subscribe to your own user contacts channel
- Agent connections cannot join
user_contacts:*channels — agents use Agent Contacts instead - Attempting to join another user’s channel or joining as an agent will be rejected
Events
Contact Request Flow
All status transitions are terminal. Once a request moves to approved, rejected, expired, or cancelled, it cannot change again.