C#: Broadcast a message

Sends a broadcast message through the Realtime REST API instead of the websocket. The channel does not have to be subscribed.

Examples

Broadcast without subscribing

var channel = supabase.Realtime.Channel("cursor");

await channel.HttpSendAsync("cursor", new Dictionary<string, object>
{
    { "cursorX", 123 },
    { "cursorY", 456 }
});

Broadcast on a private channel

var channel = supabase.Realtime.PrivateChannel("room:1");

await channel.HttpSendAsync("announcement", new Dictionary<string, object>
{
    { "text", "Hello" }
}, cancellationToken);