TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/wppconnect-team/wa-js/llms.txt
Use this file to discover all available pages before exploring further.
WPP.privacy module lets you read and update all WhatsApp privacy settings for the connected account programmatically. Settings control visibility of last seen timestamps, online presence, profile picture, about text, status stories, and read receipts, as well as who is permitted to add you to group chats. For settings that support a contact exception list (contact_blacklist), a separate disallowed-list API lets you manage individual contact exclusions.
Privacy values reference
Most functions accept avalue string from a fixed set of options. The table below explains what each value means.
| Value | Description |
|---|---|
all | Visible to everyone — both contacts and non-contacts. |
contacts | Visible only to phone contacts saved in your address book. |
contact_blacklist | Visible to your contacts, except contacts on the disallowed list. |
none | Hidden from everyone. |
match_last_seen | Mirrors the audience of your “last seen” setting. Only valid for setOnline. |
contact_blacklist requires you to manage the disallowed list via getDisallowedList(). When you pass contact_blacklist and the list parameter, entries use { id, action } objects where action is either "add" or "remove".Functions
get()
Returns all current privacy settings as a single object. Useful for auditing the current configuration before making changes.
Signature
Promise<object> — an object containing the current value for each privacy category.
Example
setLastSeen(value, disallowedList?)
Controls who can see the “last seen” timestamp on your profile.
Signature
The new last seen visibility. Must be one of
all, contacts, contact_blacklist, or none.Required when
value is contact_blacklist. Each entry specifies a contact to add to or remove from the exception list.Promise<string> — the new active value as confirmed by WhatsApp.
Examples
setOnline(value)
Controls who can see when you are currently online (the “online” indicator).
Signature
Must be
all (everyone sees your online status) or match_last_seen (online visibility mirrors your last seen audience).Promise<string> — the new active value.
Examples
setProfilePic(value, disallowedList?)
Controls who can see your profile picture.
Signature
The new profile picture visibility. Must be one of
all, contacts, contact_blacklist, or none.Required when
value is contact_blacklist. Uses the same { id, action } format as setLastSeen.Promise<string> — the new active value.
Examples
setReadReceipts(value)
Enables or disables read receipts (the blue double-tick that tells senders you have read their message).
Signature
all enables read receipts; none disables them.Promise<string> — the new active value.
Examples
setStatus(value, list?)
Controls who can see your WhatsApp Status stories. This function uses a different set of values from the other setter functions, reflecting how WhatsApp models status story privacy internally.
Signature
The new status story visibility mode.
| Value | Description |
|---|---|
contact | Visible to all your contacts. |
allow-list | Visible only to the contacts in list. |
deny-list | Visible to all contacts except those in list. |
Required when
value is allow-list or deny-list. Array of WhatsApp IDs in [number]@c.us format.Promise<string> — the new active value.
Examples
setAbout(value, disallowedList?)
Controls who can see your “about” text (the short bio on your profile).
Signature
The new about text visibility. Must be one of
all, contacts, contact_blacklist, or none.Required when
value is contact_blacklist. Uses the same { id, action } format as setLastSeen.Promise<string> — the new active value.
Examples
setAddGroup(value, disallowedList?)
Controls who is permitted to add you to WhatsApp group chats.
Signature
The new group-add permission. Must be one of
all, contacts, or contact_blacklist. Note: none is not a valid value for this setting — use contacts for the most restrictive option without a blacklist.Required when
value is contact_blacklist. Uses the same { id, action } format as setLastSeen.Promise<string> — the new active value.
Examples
getDisallowedList(type)
Returns the list of contacts currently on the disallowed (blacklist) for a given privacy category. This list is used when the corresponding setting is contact_blacklist.
Signature
The privacy category to query. Must be one of the following string values:
| Value | Privacy setting |
|---|---|
last | Last seen |
profile | Profile picture |
status | About text |
groupadd | Group add |
Promise<string[] | null> — an array of WhatsApp IDs ([number]@c.us format) on the disallowed list, or null if no list exists for that category.
If the corresponding privacy setting is not currently set to
contact_blacklist, the disallowed list may be null or empty. The list is only active when the setting value is contact_blacklist.Full privacy audit and lockdown example
The following example reads the current settings, then applies a privacy-first configuration that hides as much as possible:Managing the contact blacklist
Usecontact_blacklist together with getDisallowedList to maintain a fine-grained exception list on any supported setting: