Workflow: Managing Another User's Oracle Radio WebSocket Channel Subscriptions
Subscribe or unsubscribe another connected Radio user and verify the requester result and notifications sent to the user's affected sessions.
Before You Begin
Open an authenticated WebSocket connection for a user with radio.user.subscriptions.manage. The target username must identify a currently connected Radio user in the same Identity Domain. The service applies each operation to every currently connected WebSocket session for that target user. These operations change live channel subscriptions; they do not grant or remove channel access.
Subscribe Another User
-
Follow Subscribing an Oracle Radio User to WebSocket Channels to send
SUBSCRIBE_USER. UsetargetUserfor new integrations and supplychannelsfor one or more channel names.{ "type": "SUBSCRIBE_USER", "targetUser": "field-unit-5", "channels": ["operations", "emergency"] } -
Wait for
USER_SUBSCRIBEDon the requester's connection. Inspect each entry inchannels, and treat only an entry withsubscribedset totrueas a successful live subscription. InspectclientsSubscribedto determine how many of the target user's connected sessions are represented. If the count is absent, do not assume that only one session was affected. -
On each target-user session whose membership changes, process the
SUBSCRIBED_BYnotification and identify the requester fromsubscribedBy.
Unsubscribe Another User
-
Follow Unsubscribing an Oracle Radio User from WebSocket Channels to send
UNSUBSCRIBE_USER.{ "type": "UNSUBSCRIBE_USER", "targetUser": "field-unit-5", "channels": ["emergency"] } -
Wait for
USER_UNSUBSCRIBEDon the requester's connection. Inspect each channel result and itsclientsUnsubscribedcount when present. A result withunsubscribedset tofalsecan include areason. -
On each target-user session whose membership changes, process the
UNSUBSCRIBED_BYnotification and identify the requester fromunsubscribedBy.
Handle Denials and Connection Changes
- If the service returns
ERROR, correct the missing selector, management permission, target-user connection, or other reported problem before retrying. - If the target user disconnects, do not assume that the requested change applies to a future connection. Repeat the operation only after the user is connected and the requester still intends the change.
- Use Radio channel-access administration when the user needs an ACL grant.
SUBSCRIBE_USERandUNSUBSCRIBE_USERdo not change ACLs.