Global

Members

(readonly) ChatTypes :string

Chat types

Type:
  • string
Properties:
Name Type Description
SOLO string
GROUP string
UNKNOWN string
Source:

(readonly) ConnectionStatus :string

Provider-neutral connection lifecycle shared with Baileys and WhatsMeow.

Type:
  • string
Source:

(readonly) Events :string

Events that can be emitted by the client

Type:
  • string
Properties:
Name Type Description
AUTHENTICATED string
AUTHENTICATION_FAILURE string
READY string
CHAT_REMOVED string
CHAT_ARCHIVED string
MESSAGE_RECEIVED string
MESSAGE_CIPHERTEXT string
MESSAGE_CIPHERTEXT_FAILED string
MESSAGE_CREATE string
MESSAGE_PINNED string
MESSAGE_REVOKED_EVERYONE string
MESSAGE_REVOKED_ME string
MESSAGE_ACK string
MESSAGE_EDIT string
UNREAD_COUNT string
CHAT_STATE string
MESSAGE_REACTION string
MEDIA_UPLOADED string
CONTACT_CHANGED string
GROUP_JOIN string
GROUP_LEAVE string
GROUP_ADMIN_CHANGED string
GROUP_MEMBERSHIP_REQUEST string
GROUP_UPDATE string
QR_RECEIVED string
CODE_RECEIVED string
LOADING_SCREEN string
DISCONNECTED string
STATE_CHANGED string
BATTERY_CHANGED string
INCOMING_CALL string
REMOTE_SESSION_SAVED string
VOTE_UPDATE string
CONNECTION_STATUS string
Source:

(readonly) GroupNotificationTypes :string

Group notification types

Type:
  • string
Properties:
Name Type Description
ADD string
INVITE string
REMOVE string
LEAVE string
PROMOTE string
DEMOTE string
SUBJECT string
DESCRIPTION string
PICTURE string
ANNOUNCE string
RESTRICT string
Source:

(readonly) MessageAck :number

Message ACK

Type:
  • number
Properties:
Name Type Description
ACK_ERROR number
ACK_PENDING number
ACK_SERVER number
ACK_DEVICE number
ACK_READ number
ACK_PLAYED number
Source:

(readonly) MessageTypes :string

Message types

Type:
  • string
Properties:
Name Type Description
TEXT string
AUDIO string
VOICE string
IMAGE string
ALBUM string
VIDEO string
DOCUMENT string
STICKER string
LOCATION string
CONTACT_CARD string
CONTACT_CARD_MULTI string
ORDER string
REVOKED string
PRODUCT string
UNKNOWN string
GROUP_INVITE string
LIST string
LIST_RESPONSE string
BUTTONS_RESPONSE string
PAYMENT string
BROADCAST_NOTIFICATION string
CALL_LOG string
CIPHERTEXT string
DEBUG string
E2E_NOTIFICATION string
GP2 string
GROUP_NOTIFICATION string
HSM string
INTERACTIVE string
AUTOMATED_GREETING_MESSAGE string
NATIVE_FLOW string
NOTIFICATION string
NOTIFICATION_TEMPLATE string
OVERSIZED string
PROTOCOL string
REACTION string
TEMPLATE_BUTTON_REPLY string
POLL_CREATION string
SCHEDULED_EVENT_CREATION string
Source:

(readonly) Status :number

Client status

Type:
  • number
Properties:
Name Type Description
INITIALIZING number
AUTHENTICATING number
READY number
Source:

(readonly) WAState :string

WhatsApp state

Type:
  • string
Properties:
Name Type Description
CONFLICT string
CONNECTED string
DEPRECATED_VERSION string
OPENING string
PAIRING string
PROXYBLOCK string
SMB_TOS_BLOCK string
TIMEOUT string
TOS_BLOCK string
UNLAUNCHED string
UNPAIRED string
UNPAIRED_IDLE string
Source:

(constant) routedFunctionsByPage

Expose a function to the page if it does not exist

NOTE: Rewrite it to 'upsertFunction' after updating Puppeteer to 20.6 or higher using page.removeExposedFunction https://pptr.dev/api/puppeteer.page.removeexposedfunction

Source:

Methods

assertCanonicalTargetProviderCompatibility()

WhatsMeow currently uses go.mau.fi/libsignal's classical X3DH wire and storage model. It cannot retain WWeb's ML-KEM prekeys or consume a pending PQXDH session. A handoff is therefore portable only when the source gives an explicit, internally consistent proof that post-quantum state is inactive and no PQ-scoped Signal session exists.

This check deliberately fails closed for projections written by older bridges that did not publish the PQ capability fields. Silently treating an unknown state as classical could strand messages encrypted to a server-side Kyber prekey after the Chromium source has already been stopped.

Source:

browserProjectionFromWhatsAppWebProfile()

Converts the Chrome extension's lossless WhatsApp Web profile into the BrowserSessionBridge ABI. Only packages produced by the loss-aware v1 serializer are accepted. Older v1 packages omitted completeness metadata while silently dropping CryptoKey/cyclic values and are intentionally rejected rather than treated as a recoverable browser session.

Source:

canonicalBrowserProjectionToStore()

Convert the page-realm envelope to the public/store ABI. The browser uses base64 because Puppeteer must cross a structured-clone boundary; callers and PostgreSQL always receive byte arrays instead.

Source:

canonicalStoreProjectionToBrowser()

Convert the public/store ABI back to the page-realm envelope.

Source:

compareCanonicalAppState()

Compare the source app-state watermark with a freshly synced WWebJS projection. Collection names and MAC material never leave this function; callers only receive aggregate counts and an opaque collection identifier.

Source:

getBrowserConnectionState(browser) → {boolean|undefined}

Returns the known Puppeteer browser connection state across supported releases. Unknown embedders intentionally return undefined so cleanup code can preserve its conservative fallback. Puppeteer 25 replaced Browser.isConnected() with the Browser.connected getter, while older releases and embedders can still expose the method.

Parameters:
Name Type Description
browser object

Puppeteer Browser instance

Source:
Returns:
Type
boolean | undefined

(async) importWhatsAppWebSessionToLocalAuth()

Restores a normalized WhatsApp Web profile package into the directory used by LocalAuth.

Raw browser cookies/localStorage are not enough to build a Chromium profile. The package must include payload.wwebjs_local_auth.files, where each key is a profile-relative path and each value is either a UTF-8 string or { data, encoding: "utf8" | "base64" }.

Source:

normalizeCanonicalAppStateForPortablePersistence()

Keep the PostgreSQL projection portable when Chromium's native sync-actions store retains mutation rows beyond a collection watermark. Those rows are valid browser-local recovery material, but they are not a complete LT-hash collection and therefore cannot be replayed as a canonical source.

Existing snapshot-resync markers remain authoritative and newly detected future-row collections are added to them. The affected collection rows are removed without retagging any MAC; the authenticated target must request a fresh server snapshot for exactly those collections.

Source:

normalizeCanonicalAppStateForProviderHandoff()

A provider-handoff manifest makes every declared snapshot-resync collection an instruction to the target, rather than a description of browser-local material. Consequently no watermark or mutation MAC for such a collection may cross the provider boundary, even when all browser rows are at or below the current watermark. Baileys and WhatsMeow both start those collections from version zero and request an authenticated server snapshot.

Source:

normalizeCanonicalAppStateForSnapshotResync()

A newly paired browser can finish WhatsApp Web's official full-sync job while its sync-actions store still contains rows ahead of the collection watermark. Those rows are not a portable LT-hash map and must never be retagged as the current collection version.

For collections that do not exist in a trusted baseline, represent that state truthfully as "snapshot resync required": remove the collection watermark and every mutation MAC belonging to it, while preserving the app-state sync keys. Baileys/WhatsMeow will consequently start from version zero and request an authenticated server snapshot. Existing baseline collections are deliberately ineligible, so restart/handoff comparison remains strict.

Source:

normalizeCanonicalAuthoritativeAppStateForPortablePersistence()

Convert a two-sample-attested native WWeb app-state view into portable canonical material. The native sync-actions store legitimately retains queue entries above the committed collection watermark after the socket is connected. Those entries are browser-private work, but the collection version/LT hash itself is authoritative and must not be discarded.

This path is restricted to authenticated native authority. Its callers prove that every canonical collection is materialized and either attest two complete same-provider exports or bind the projection to an exact official cross-provider sync generation plus a strict portable-source comparison. We can then keep each committed watermark, discard only MAC rows above it, and consume an older snapshot-resync marker. Initial-pairing paths remain fail-closed.

Source:

normalizeCanonicalOfficialSyncFutureMacs()

A reused WWeb profile may retain browser-private sync-action rows from an older runtime even after the imported cross-provider source and every committed native watermark agree. During an exact official sync generation those future rows cannot become a prerequisite for completing that same generation, otherwise the page observer and host gate wait on each other.

Normalize only when the raw comparison proves that every remaining blocker is a future target MAC. Exact one-to-one source substitutes are re-anchored to their trusted source row; unmatched rows above the native watermark are discarded as browser-private work. The resulting projection must compare strictly ready against the portable source. Any committed mismatch remains pending/diverged and is never hidden by this helper.

Source:

normalizeCanonicalProjection()

Validate the provider-neutral envelope before it crosses a trust boundary. This deliberately validates shape and sizes without parsing or logging any cryptographic value.

Source:

(async) prepareRoutedFunction(page, name) → {Promise.<boolean>}

Install a stable Puppeteer binding while the Page target is known to be quiescent. A later exposeFunctionIfAbsent call only replaces the in-process handler and never calls Page.addScriptToEvaluateOnNewDocument again.

Parameters:
Name Type Description
page object

Puppeteer Page instance

name string
Source:
Returns:

whether this process owns the routed binding

Type
Promise.<boolean>

reconcileCanonicalAppStateForPersistence()

Keep WWebJS' browser-only future sync-action representation out of the provider-neutral PostgreSQL projection. A future row is replaced with the previously trusted canonical row only when compareCanonicalAppState proved a one-to-one index/value substitution under an identical version/LT hash.

Source:

(async) validateCanonicalPqKeyPairs()

Prove every imported ML-KEM-1024 pair outside Chromium. WWeb's private KEM API performs its nominally async work synchronously on the renderer thread, so a normal 101-key Baileys inventory otherwise needs roughly four minutes and starves the page-task observer. Noble performs the same FIPS 203 encapsulation/decapsulation proof in the Node realm in a few milliseconds. The returned digest binds that proof to the exact byte material consumed by the page; the page recomputes it before it is allowed to skip its fallback.

Source:

Type Definitions

AddParticipantsResult

An object that handles the result for addParticipants method

Type:
  • Object
Properties:
Name Type Description
code number

The code of the result

message string

The result message

isInviteV4Sent boolean

Indicates if the inviteV4 was sent to the partitipant

Source:

AddParticipnatsOptions

An object that handles options for adding participants

Type:
  • Object
Properties:
Name Type Attributes Default Description
sleep Array.<number> | number <optional>
[250, 500]

The number of milliseconds to wait before adding the next participant. If it is an array, a random sleep time between the sleep[0] and sleep[1] values will be added (the difference must be >=100 ms, otherwise, a random sleep time between sleep[1] and sleep[1] + 100 will be added). If sleep is a number, a sleep time equal to its value will be added. By default, sleep is an array with a value of [250, 500]

autoSendInviteV4 boolean <optional>
true

If true, the inviteV4 will be sent to those participants who have restricted others from being automatically added to groups, otherwise the inviteV4 won't be sent (true by default)

comment string <optional>
''

The comment to be added to an inviteV4 (empty string by default)

Source:

ButtonSpec

Button spec used in Buttons constructor

Type:
  • Object
Properties:
Name Type Attributes Description
id string <optional>

Custom ID to set on the button. A random one will be generated if one is not passed.

body string

The text to show on the button.

Source:

ChannelId

Channel ID structure

Type:
  • Object
Properties:
Name Type Description
server string
user string
_serialized string
Source:

ContactId

ID that represents a contact

Type:
  • Object
Properties:
Name Type Description
server string
user string
_serialized string
Source:

CreateChannelOptions

Options for the channel creation

Type:
  • Object
Properties:
Name Type Attributes Description
description string <nullable>

The channel description

picture MessageMedia <nullable>

The channel profile picture

Source:

CreateChannelResult

An object that handles the result for createChannel method

Type:
  • Object
Properties:
Name Type Description
title string

A channel title

nid ChatId

An object that handels the newly created channel ID

Properties
Name Type Description
server string

'newsletter'

user string

'XXXXXXXXXX'

_serialized string

'XXXXXXXXXX@newsletter'

inviteLink string

The channel invite link, starts with 'https://whatsapp.com/channel/'

createdAtTs number

The timestamp the channel was created at

Source:

CreateGroupOptions

An object that handles options for group creation

Type:
  • Object
Properties:
Name Type Attributes Default Description
messageTimer number <optional>
0

The number of seconds for the messages to disappear in the group (0 by default, won't take an effect if the group is been creating with myself only)

parentGroupId string | undefined

The ID of a parent community group to link the newly created group with (won't take an effect if the group is been creating with myself only)

autoSendInviteV4 boolean <optional>
true

If true, the inviteV4 will be sent to those participants who have restricted others from being automatically added to groups, otherwise the inviteV4 won't be sent (true by default)

comment string <optional>
''

The comment to be added to an inviteV4 (empty string by default)

memberAddMode boolean <optional>
false

If true, only admins can add members to the group (false by default)

membershipApprovalMode boolean <optional>
false

If true, group admins will be required to approve anyone who wishes to join the group (false by default)

isRestrict boolean <optional>
true

If true, only admins can change group group info (true by default)

isAnnounce boolean <optional>
false

If true, only admins can send messages (false by default)

Source:

CreateGroupResult

An object that handles the result for createGroup method

Type:
  • Object
Properties:
Name Type Description
title string

A group title

gid Object

An object that handles the newly created group ID

Properties
Name Type Description
server string
user string
_serialized string
participants Object.<string, ParticipantResult>

An object that handles the result value for each added to the group participant

Source:

FormattedButtonSpec

Type:
  • Object
Properties:
Name Type Description
buttonId string
type number
buttonText Object
Source:

GroupMembershipRequest

An object that handles the information about the group membership request

Type:
  • Object
Properties:
Name Type Description
id Object

The wid of a user who requests to enter the group

addedBy Object

The wid of a user who created that request

parentGroupId Object | null

The wid of a community parent group to which the current group is linked

requestMethod string

The method used to create the request: NonAdminAdd/InviteLink/LinkedGroupJoin

t number

The timestamp the request was created at

Source:

GroupMembershipRequest

An object that handles the information about the group membership request

Type:
  • Object
Properties:
Name Type Description
id Object

The wid of a user who requests to enter the group

addedBy Object

The wid of a user who created that request

parentGroupId Object | null

The wid of a community parent group to which the current group is linked

requestMethod string

The method used to create the request: NonAdminAdd/InviteLink/LinkedGroupJoin

t number

The timestamp the request was created at

Source:

GroupMention

An object representing mentions of groups

Type:
  • Object
Properties:
Name Type Description
subject string

The name of a group to mention (can be custom)

id string

The group ID, e.g.: 'XXXXXXXXXX@g.us'

Source:

GroupMention

Type:
  • Object
Properties:
Name Type Description
groupSubject string

The name of the group

groupJid string

The group ID

Source:

GroupParticipant

Group participant information

Type:
  • Object
Properties:
Name Type Description
id ContactId
isAdmin boolean
isSuperAdmin boolean
Source:

LocationSendOptions

Location send options

Type:
  • Object
Properties:
Name Type Attributes Description
name string <optional>

Location name

address string <optional>

Location address

url string <optional>

URL address to be shown within a location message

description string <optional>

Location full description

Source:

MembershipRequestActionOptions

An object that handles options for approveGroupMembershipRequests and rejectGroupMembershipRequests methods

Type:
  • Object
Properties:
Name Type Description
requesterIds Array.<string> | string | null

User ID/s who requested to join the group, if no value is provided, the method will search for all membership requests for that group

sleep Array.<number> | number | null

The number of milliseconds to wait before performing an operation for the next requester. If it is an array, a random sleep time between the sleep[0] and sleep[1] values will be added (the difference must be >=100 ms, otherwise, a random sleep time between sleep[1] and sleep[1] + 100 will be added). If sleep is a number, a sleep time equal to its value will be added. By default, sleep is an array with a value of [250, 500]

Source:

MembershipRequestActionOptions

An object that handles options for approveGroupMembershipRequests and rejectGroupMembershipRequests methods

Type:
  • Object
Properties:
Name Type Description
requesterIds Array.<string> | string | null

User ID/s who requested to join the group, if no value is provided, the method will search for all membership requests for that group

sleep Array.<number> | number | null

The number of milliseconds to wait before performing an operation for the next requester. If it is an array, a random sleep time between the sleep[0] and sleep[1] values will be added (the difference must be >=100 ms, otherwise, a random sleep time between sleep[1] and sleep[1] + 100 will be added). If sleep is a number, a sleep time equal to its value will be added. By default, sleep is an array with a value of [250, 500]

Source:

MembershipRequestActionResult

An object that handles the result for membership request action

Type:
  • Object
Properties:
Name Type Description
requesterId string

User ID whos membership request was approved/rejected

error number | undefined

An error code that occurred during the operation for the participant

message string

A message with a result of membership request action

Source:

MembershipRequestActionResult

An object that handles the result for membership request action

Type:
  • Object
Properties:
Name Type Description
requesterId string

User ID whos membership request was approved/rejected

error number

An error code that occurred during the operation for the participant

message string

A message with a result of membership request action

Source:

MessageInfo

Message Info

Type:
  • Object
Properties:
Name Type Description
delivery Array.<{id: ContactId, t: number}>

Contacts to which the message has been delivered to

deliveryRemaining number

Amount of people to whom the message has not been delivered to

played Array.<{id: ContactId, t: number}>

Contacts who have listened to the voice message

playedRemaining number

Amount of people who have not listened to the message

read Array.<{id: ContactId, t: number}>

Contacts who have read the message

readRemaining number

Amount of people who have not read the message

Source:

MessageSendOptions

Message options.

Type:
  • Object
Properties:
Name Type Attributes Default Description
linkPreview boolean <optional>
true

Show links preview. Has no effect on multi-device accounts.

sendAudioAsVoice boolean <optional>
false

Send audio as voice message with a generated waveform

sendVideoAsGif boolean <optional>
false

Send video as gif

sendMediaAsSticker boolean <optional>
false

Send media as a sticker

sendMediaAsDocument boolean <optional>
false

Send media as a document

sendMediaAsHd boolean <optional>
false

Send image as quality HD

isViewOnce boolean <optional>
false

Send photo/video as a view once message

parseVCards boolean <optional>
true

Automatically parse vCards and send them as contacts

caption string <optional>

Image or video caption

quotedMessageId string <optional>

Id of the message that is being quoted (or replied to)

groupMentions Array.<GroupMention> <optional>

An array of object that handle group mentions

mentions Array.<string> <optional>

User IDs to mention in the message

sendSeen boolean <optional>
true

Mark the conversation as seen after sending the message

invokedBotWid string <optional>

Bot Wid when doing a bot mention like @Meta AI

stickerAuthor string <optional>

Sets the author of the sticker, (if sendMediaAsSticker is true).

stickerName string <optional>

Sets the name of the sticker, (if sendMediaAsSticker is true).

stickerCategories Array.<string> <optional>

Sets the categories of the sticker, (if sendMediaAsSticker is true). Provide emoji char array, can be null.

ignoreQuoteErrors boolean <optional>
true

Should the bot send a quoted message without the quoted message if it fails to get the quote?

waitUntilMsgSent boolean <optional>
false

Should the bot wait for the message send result?

media MessageMedia <optional>

Media to be sent

extra any <optional>

Extra options

Source:

MessageSendOptions

Message options

Type:
  • Object
Properties:
Name Type Attributes Description
caption string <nullable>

Image or video caption

mentions Array.<string> <nullable>

User IDs of user that will be mentioned in the message

media MessageMedia <nullable>

Image or video to be sent

Source:

ParticipantResult

An object that represents the result for a participant added to a group

Type:
  • Object
Properties:
Name Type Description
statusCode number

The status code of the result

message string

The result message

isGroupCreator boolean

Indicates if the participant is a group creator

isInviteV4Sent boolean

Indicates if the inviteV4 was sent to the participant

Source:

PollSendOptions

Poll send options

Type:
  • Object
Properties:
Name Type Attributes Default Description
allowMultipleAnswers boolean <optional>
false

If false it is a single choice poll, otherwise it is a multiple choice poll (false by default)

messageSecret Array.<number> <nullable>

The custom message secret, can be used as a poll ID. NOTE: it has to be a unique vector with a length of 32

Source:

ReactionList

Reaction List

Type:
  • Object
Properties:
Name Type Description
id string

Original emoji

aggregateEmoji string

aggregate emoji

hasReactionByMe boolean

Flag who sent the reaction

senders Array.<Reaction>

Reaction senders, to this message

Source:

ScheduledEventSendOptions

ScheduledEvent send options

Type:
  • Object
Properties:
Name Type Attributes Default Description
description string <nullable>

The scheduled event description

endTime Date <nullable>

The end time of the event

location string <nullable>

The location of the event

callType string <nullable>

The type of a WhatsApp call link to generate, valid values are: video | voice | none

isEventCanceled boolean <optional>
false

Indicates if a scheduled event should be sent as an already canceled

messageSecret Array.<number> <nullable>

The custom message secret, can be used as an event ID. NOTE: it has to be a unique vector with a length of 32

Source:

SelectedPollOption

Selected poll option structure

Type:
  • Object
Properties:
Name Type Description
localId number

The local selected or deselected option ID

name string

The option name

Source:

SendChannelAdminInviteOptions

Type:
  • Object
Properties:
Name Type Attributes Description
comment string <nullable>

The comment to be added to an invitation

Source:

SendChannelAdminInviteOptions

Type:
  • Object
Properties:
Name Type Attributes Description
comment string <nullable>

The comment to be added to an invitation

Source:

StickerMetadata

Sticker metadata.

Type:
  • Object
Properties:
Name Type Attributes Description
name string <optional>
author string <optional>
categories Array.<string> <optional>
Source:

TargetOptions

Target options object description

Type:
  • Object
Properties:
Name Type Description
module string | number

The target module

function string

The function name to get from a module

Source:

TargetOptions

Target options object description

Type:
  • Object
Properties:
Name Type Description
module string | number

The target module

function string

The function name to get from a module

Source:

TransferChannelOwnershipOptions

Options for transferring a channel ownership to another user

Type:
  • Object
Properties:
Name Type Attributes Default Description
shouldDismissSelfAsAdmin boolean <optional>
false

If true, after the channel ownership is being transferred to another user, the current user will be dismissed as a channel admin and will become to a channel subscriber.

Source:

TransferChannelOwnershipOptions

Options for transferring a channel ownership to another user

Type:
  • Object
Properties:
Name Type Attributes Default Description
shouldDismissSelfAsAdmin boolean <optional>
false

If true, after the channel ownership is being transferred to another user, the current user will be dismissed as a channel admin and will become to a channel subscriber.

Source:

UnsubscribeOptions

Options for unsubscribe from a channel

Type:
  • Object
Properties:
Name Type Attributes Default Description
deleteLocalModels boolean <optional>
false

If true, after an unsubscription, it will completely remove a channel from the channel collection making it seem like the current user have never interacted with it. Otherwise it will only remove a channel from the list of channels the current user is subscribed to and will set the membership type for that channel to GUEST

Source: