Send an event to a member
POST
/v1/realtime/apps/{realtime_app_id}/members/{member_id}/events
await bird.realtime.members.send("rap_01krdgeqcxet5s7t44vh8rt9mg", "user_42", {
event: "order-shipped",
data: { order_id: "ord_123" },
});client.realtime.members.send(
"rap_01krdgeqcxet5s7t44vh8rt9mg",
"user_42",
event="order-shipped",
data={"order_id": "ord_123"},
)err = client.Realtime.Members.Send(context.Background(), "rap_01krdgeqcxet5s7t44vh8rt9mg", "user_42", bird.RealtimeMemberSendParams{
Event: "order-shipped",
Data: map[string]any{"order_id": "ord_123"},
})
if err != nil {
log.Fatal(err)
}$bird->realtime->members->send($appId, 'usr_01krdgeqcxet5s7t44vh8rt9mg', (new RealtimeMemberPublish())
->setEvent('order-shipped')
->setData(['order_id' => 'ord_123']));curl -X POST "https://us1.platform.bird.com/v1/realtime/apps/{realtime_app_id}/members/{member_id}/events" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"event": "order-updated"
}'Delivers an event to one member of a Realtime app, addressing the person
rather than a channel. Every connection that member currently holds receives
it across tabs and devices, without requiring a dedicated channel.
The member must have signed in on the connection for it to be addressable.
Delivery is best-effort and not queued. A member with no active connections
at the time of the call does not receive the event.
Paramètres
realtime_app_id
string
ID of the Realtime app (rap_ prefix), as returned when the app was created.
member_id
string
The member to deliver the event to.
Corps de la requête
event
string
obligatoire
The event name clients bind to. Application event names are free-form; the bird: and bird_internal: prefixes are reserved for the protocol and rejected.
data
Arbitrary JSON payload delivered as the event data: an object, array, or scalar. Cap: 10 KB serialized.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet. Les ressources sont en anglais.
Explorer la fonctionnalitéRealtimeSuivre le parcours d'apprentissageBuild your first integrationGuide d'implémentationSend your first realtime event
Essayez la pratique et obtenez un guide d'implémentation