The Browser we're telling the WhatsApp Web servers we are
key to use to order chats
Should requests be queued when the connection breaks in between; if 0, then an error will be thrown
Whether the phone is connected
log messages
The connection state
Metadata like WhatsApp id, name set on WhatsApp etc.
The version of WhatsApp Web we're telling the servers we are
base 64 encode the authentication credentials and return them these can then be used to login again by passing the object to the connect () function.
Add or remove user from blocklist
the ID of the person who you are blocking/unblocking
type of operation
Can you login to WA without scanning the QR
Marks a chat as read/unread; updates the chat object too
the ID of the person/group whose message you want to mark read
Clear authentication info so a new connection can be created
Delete a message in a chat for yourself
key of the message you want to delete
Close the connection to WhatsApp Web
Connect to WhatsApp Web
Delete the chat of a given ID
Delete a message in a chat for everyone
key of the message you want to delete
Securely downloads the media from the message and saves to a file. Renews the download url automatically, if necessary.
the media message you want to decode
the name of the file where the media will be saved
should the parsed extension be applied automatically to the file
Securely downloads the media from the message. Renews the download url automatically, if necessary.
Get the metadata of the group from WA
Find a message in a given conversation
the number of messages to load in a single request
callback for every message retreived, if return true -- the loop will break
Forward a message like WA
the chat ID to forward to
the message to forward
will show the message as forwarded even if it is from you
Generate forwarded message content like WA does
the message to forward
will show the message as forwarded even if it is from you
Query a string to check if it has a url, if it does, return required extended text message
Query broadcast list info
Fetch your chats
Get your contacts
Get the URL to download the profile picture of a person/group
Query the status of the person (see groupMetadata() for groups)
Get the stories of your contacts
Add somebody to the group
the ID of the group
the people to add
Create a group
like, the title of the group
people to include in the group
Make demote an admin on the group
the ID of the group
the people to make admin
Get the invite link of the given group
Leave a group
the ID of the group
Make someone admin on the group
the ID of the group
the people to make admin
Get the metadata of the group Baileys automatically caches & maintains this state
Get the metadata (works after you've left the group also)
Generic function for group queries
Remove somebody from the group
the ID of the group
the people to remove
Make demote an admin on the group
the ID of the group
Update the group description
the ID of the group
Update the subject of the group
the ID of the group
the new title of the group
Query whether a given number is registered on WhatsApp
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Query whether a given number is registered on WhatsApp, without needing to open a WS connection
phone number/jid you want to check for
undefined if the number doesn't exists, otherwise the correctly formatted jid
Load the entire friggin conversation with a group or person
callback for every message retreived
the number of messages to load in a single request
retreive the most recent message first or retreive from the converation start
Load in the authentication credentials
the authentication credentials or file path to auth credentials
Load chats in a paginated manner + gets the profile picture
number of results to return
chats before the given cursor
the chats & the cursor to fetch the next page
Load a single message specified by the ID
Load the conversation with a group or person
the number of messages to load
the data for which message to offset the query by
retreive the most recent message first or retreive from the converation start
Disconnect from the phone. Your auth credentials become invalid after sending a disconnect request.
Get the message info, who has read it, who its been delivered to
Loads all messages sent after a specific date
Clear the chat messages
the ID of the person/group you are modifiying
delete starred messages, default false
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
only for muting, how long to mute the chat for
Modify a given chat (archive, pin etc.)
the ID of the person/group you are modifiying
when the connection has opened successfully
when the connection is opening
when the connection has been validated
when the connection has closed
when the socket is closed
when WA updates the credentials
when a new QR is generated, ready for scanning
when the connection to the phone changes
when a user's presence is updated
when a user's status is updated
when a user's status is updated
when a new chat is added
when contacts are sent by WA
when chats are sent by WA, and when all messages are received
when multiple chats are updated (new message, updated message, deleted, pinned, etc)
when a chat is updated (new message, updated message, deleted, pinned, presence updated etc)
when a new message is relayed
when a message object itself is updated (receives its media info or is deleted)
when a message's status is updated (deleted, delivered, read, sent etc.)
when participants are added to a group
when the group is updated
when WA sends back a pong
when a user is blocked or unblockd
Prepares a message for sending via sendWAMessage ()
Prepares the message content
prepares a WAMessage for sending from the given content & options
Prepare a media message for sending
Query something from the WhatsApp servers
Relay (send) a WAMessage; more advanced functionality to send a built WA Message, you may want to stick with sendMessage()
Refresh QR Code
the new ref
Request an update on the presence of a user
Search WhatsApp messages with a given text string
the search string
the ID of the chat to search in, set to null to search all chats
number of results to return
page number of results (starts from 1)
Send a message to the given ID (can be group, single, or broadcast)
the id to send to
the message can be a buffer, plain string, location message, extended text message
type of message
Extra options
Send the same queries WA Web sends after connect
Sends a read receipt for a given message; does not update the chat do @see chatRead
the ID of the person/group whose message you want to mark read
the key of the message
number of messages to read, set to < 0 to unread a message
Star or unstar a message
key of the message you want to star or unstar
Toggles disappearing messages for the given chat
the chat to toggle
0 to disable, enter any positive number to enable disappearing messages for the specified duration; For the default see WA_DEFAULT_EPHEMERAL
Fetches the latest url & media key for the given message. You may need to call this when the message is old & the content is deleted off of the WA servers
Tell someone about your presence -- online, typing, offline etc.
the ID of the person/group who you are updating
your presence
Update the profile picture
Wait for a message with a certain tag to be received
the message tag to await
timeout after which the promise will reject
Generated using TypeDoc
When to auto-reconnect