Skip to main content
The Events feature creates WhatsApp event messages — the scheduled-event bubble with a date, location, and join link. It also sends RSVPs. Like polls, an event carries a per-message message_secret. Responders derive their RSVP encryption key from that secret. Keep the secret so you can send and decrypt responses later.

Access

Access event operations through the client:

Methods

create

Create and send an event message.
to
&Jid
required
Recipient JID — a direct message or group chat.
params
EventCreationParams
required
Event details. Only name is required; everything else is optional. See EventCreationParams.
(send_result, message_secret)
(SendResult, Vec<u8>)
A SendResult and the event’s 32-byte message_secret. Store the secret — it is required to decrypt the RSVPs that come back. A fresh secret is generated per event and attached as messageContextInfo.messageSecret; WhatsApp Web rejects an event without one.
Example:

respond

RSVP to an event. The RSVP is end-to-end encrypted against the event’s message_secret.
chat_jid
&Jid
required
Chat JID where the event was sent.
event_msg_id
&str
required
Message ID of the event creation message.
event_creator_jid
&Jid
required
JID of the user who created the event. It keys the RSVP’s encryption derivation and AAD, so it must match the creator exactly.
message_secret
&[u8]
required
The 32-byte secret from the event creation message.
response
EventResponseType
required
Going, NotGoing, or Maybe. See EventResponseType.
extra_guest_count
Option<i32>
Number of additional guests you’re bringing, when the event allows extra guests.
SendResult
SendResult
Result of the RSVP send. See SendResult.
Example:
The responder (self) JID also keys the derivation, so it must use the creator’s namespace: your own LID for a LID-addressed event, your PN otherwise (falling back to PN when your LID isn’t known). The library resolves this for you, mirroring the poll-vote path.

Decrypting inbound RSVPs

When you receive an EncEventResponseMessage, decrypt it with the event’s secret using the helpers in wacore::event:
Both are thin wrappers over the shared secret_enc_addon machinery specialized for the "Event Response" use-case, matching WhatsApp Web’s WAWebAddonEncryption.

Types

EventCreationParams

EventResponseType

whatsapp_rust re-exports this enum from the generated proto.

Error handling

All methods return Result<T, anyhow::Error>. Common errors:
  • Empty event name when calling create.
  • Not logged in — the responder’s own JID can’t be determined.
  • message_secret not 32 bytes — encryption/decryption rejects the wrong size.
  • GCM tag verification failed — wrong secret, wrong creator/responder JID, or a tampered payload.

See also

  • Polls — the closest analog; also uses a per-message secret
  • Send API — low-level send operations
  • Events — event types emitted on receive