open-wa
DocsAPI reference

Events

Generated reference for registered client events and their payloads.

Events

open-wa emits 17 events. Subscribe with the client helper (client.onMessage), the legacy listener name, or the event bus wildcard. Payload types are derived from each event's registered schema.

EventLegacy listenerDescriptionPayloadStatusLicense
ackonAckFired when a message acknowledgment is received{ id: MessageId; ack: "ACK_PENDING" | "ACK_SERVER" | "ACK_DEVICE" | "ACK_READ" | "ACK_PLAYED" | -1 | "ACK_ERROR" | 0 | 1 | 2 | 3 | 4 }stable-
addedToGrouponAddedToGroupFired when you are added to a group{ groupId: string; groupName: string; addedBy?: string }stable-
anyMessageonAnyMessageFired for any message including own messagesMessagestable-
callStateonCallStateObserved native call state, including unknown states.{ id: string; sessionId: string; generation: string; peer: string; state: string; direction: "incoming" | "outgoing"; video: boolean; terminal: boolean; observedAt: number | "Infinity" | "-Infinity" | "NaN"; endReason?: { code: string; message: string; source: "local" | "media" | "license" | "session" | "whatsapp" }; media?: { state: "attached" | "ended"; reason?: string } }experimentalrestricted
chatStateonChatStateFired when someone is typing or recording{ chatId: string; state: "typing" | "recording" | "paused"; senderId: string }stable-
eventonEventA native event added or changed in the synced message store, including this account’s events.WhatsAppEventbeta-
eventResponseonEventResponseA decrypted RSVP added or changed in WhatsApp’s dedicated event-response collection. History loads may emit responses too; deduplicate by id and timestamp.EventResponsebeta-
formResponseonFormResponseA form submission with question IDs and chosen option IDsFormResponsestableinsiders
incomingCallonIncomingCallA native incoming call. The SDK hydrates its bound controls.{ id: string; sessionId: string; generation: string; peer: string; state: string; direction: "incoming" | "outgoing"; video: boolean; terminal: boolean; observedAt: number | "Infinity" | "-Infinity" | "NaN"; endReason?: { code: string; message: string; source: "local" | "media" | "license" | "session" | "whatsapp" }; media?: { state: "attached" | "ended"; reason?: string } }experimentalrestricted
interactiveResponseonInteractiveResponseStructured reply, list, form or native interactive responseInteractiveResponsestableinsiders
logoutonLogoutFired when the session is logged out{ reason?: string; timestamp: number }stable-
messageonMessageFired when a new message is received (excluding own messages)Messagestable-
messageDeletedonMessageDeletedFired when a message is deletedMessagestable-
participantsChangedonParticipantsChangedFired when group participants change{ groupId: GroupId; action: "add" | "remove" | "promote" | "demote" | "invite" | "leave"; participantIds: ContactId[]; by?: string; who?: ContactId; chat?: GroupId | { _serialized: GroupId } }stable-
pollVoteonPollVoteA decrypted poll vote added or changed in the synced store. Hydration can emit old votes. Hidden-voter polls omit sender and message identifiers. Deduplicate ordinary votes by id and timestamp; refresh getPollResults for current totals.PollVotebeta-
reactiononReactionFired when a reaction is added to a message{ messageId: string; reaction: string; senderId: string; timestamp: number }stable-
stateChangedonStateChangedFired when connection state changes{ state: "STARTING" | "AUTHENTICATING" | "READY" | "STOPPED" | "CONNECTED" | "DISCONNECTED" | "SYNCING" | "CONFLICT" | "UNLAUNCHED" | "PAIRING" | "TIMEOUT"; previousState?: "STARTING" | "AUTHENTICATING" | "READY" | "STOPPED" | "CONNECTED" | "DISCONNECTED" | "SYNCING" | "CONFLICT" | "UNLAUNCHED" | "PAIRING" | "TIMEOUT" }stable-

Was this helpful?

Your answer includes the page path and docs version.