chat:lobby, order:42, doc:abc.
Who may join and send is decided by the rule you set in Studio (Services → Realtime → Channels). By default signed-in users may join and send.
Subscribe and listen
subscribe() opens the connection.
What a message holds
Send
send throws RealtimeError.
You can publish without subscribing (pawabase.realtime.publish(channel, event, payload)), which also works on the synchronous Python client.
Listen to one event or all
room.on(None, handler) for every message; room.on("typing", handler) for one.
Read as a loop
Typed payloads (TypeScript)
In React
Naming channels
Errors
subscribe() and send() throw RealtimeError when a rule refuses: not signed in while the rule needs a user, wrong organization, the key is wrong. Check the rule in Studio, then Activity.
Presence
Who is here.
History
Messages for latecomers.