Workflow: Joining an Oracle Radio WebSocket Channel

Find a visible Radio channel, subscribe the current WebSocket connection, and verify its live channel membership.

Before You Begin

Open an authenticated WebSocket connection for an enabled Radio user. Listing channels requires radio.channel.list. Subscribing requires radio.channel.subscribe and subscribe access to the target channel.

Join the Channel

  1. Follow Listing Available Oracle Radio WebSocket Channels to send LIST_ALL_CHANNELS.

  2. Wait for ALL_CHANNELS_LIST, and select the target channel from the returned channels array. A hidden channel is listed only when the user has explicit access.

  3. Follow Subscribing to an Oracle Radio WebSocket Channel to send SUBSCRIBE. For a portable request, supply exactly one channel selector and prefer the channels array.

    {
      "type": "SUBSCRIBE",
      "channels": ["operations"]
    }
  4. Wait for SUBSCRIBED. For a batch response, verify that channels.operations.subscribed is true. Treat a per-channel denied value of true as a failed join.

  5. Follow Listing Oracle Radio WebSocket Channel Subscriptions to send LIST_CHANNELS. Verify that operations is present in the returned channels array before using a channel-dependent operation.

Handle an Unavailable or Denied Channel

  • If the target channel is absent from ALL_CHANNELS_LIST, do not infer whether a hidden channel exists. Verify the channel name and ask a Radio administrator to confirm the user's channel access.
  • If the service returns SUBSCRIBE_DENIED, use its reason and code to correct the Radio permission or channel-access problem before retrying.
  • If a batch SUBSCRIBED response reports a denial for one channel, continue only with channels whose subscribed value is true.
  • If the service returns ERROR, correct the request or connection state before sending another subscription request.
Note

A live channel subscription applies to the current WebSocket connection. After reconnecting, subscribe again and use LIST_CHANNELS to verify the new connection's memberships.