open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Events

Generated reference for registered client events and their payloads.

Events

Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.

open-wa emits 10 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 receivedobject { ack, chatId, id, timestamp }stable-
addedToGrouponAddedToGroupFired when you are added to a groupobject { addedBy, groupId, groupName }stable-
anyMessageonAnyMessageFired for any message including own messagesobject { ack, author, body, broadcast, caption, chat, chatId, clientUrl, content, deprecatedMms3Url, from, fromMe, id, invis, isForwarded, isGroupMsg, isMedia, isMMS, isNewMsg, isNotification, isPSA, isQuotedMsgAvailable, labels, mentionedJidList, notifyName, quotedMsg, quotedMsgObj, recvFresh, self, sender, senderId, star, t, timestamp, to, type }stable-
chatStateonChatStateFired when someone is typing or recordingobject { chatId, senderId, state }stable-
logoutonLogoutFired when the session is logged outobject { reason, timestamp }stable-
messageonMessageFired when a new message is received (excluding own messages)object { ack, author, body, broadcast, caption, chat, chatId, clientUrl, content, deprecatedMms3Url, from, fromMe, id, invis, isForwarded, isGroupMsg, isMedia, isMMS, isNewMsg, isNotification, isPSA, isQuotedMsgAvailable, labels, mentionedJidList, notifyName, quotedMsg, quotedMsgObj, recvFresh, self, sender, senderId, star, t, timestamp, to, type }stable-
messageDeletedonMessageDeletedFired when a message is deletedobject { ack, author, body, broadcast, caption, chat, chatId, clientUrl, content, deprecatedMms3Url, from, fromMe, id, invis, isForwarded, isGroupMsg, isMedia, isMMS, isNewMsg, isNotification, isPSA, isQuotedMsgAvailable, labels, mentionedJidList, notifyName, quotedMsg, quotedMsgObj, recvFresh, self, sender, senderId, star, t, timestamp, to, type }stable-
participantsChangedonParticipantsChangedFired when group participants changeobject { action, by, groupId, participantIds }stable-
reactiononReactionFired when a reaction is added to a messageobject { messageId, reaction, senderId, timestamp }stable-
stateChangedonStateChangedFired when connection state changesobject { previousState, state }stable-
Wally the Walrus typing

Was this helpful?

Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!

On this page