Skip to main content
Group operations live on client.group (WaGroupCoordinator). Group JIDs end in @g.us.

Querying groups

WaGroupMetadata includes the subject, owner, participant list (WaGroupParticipant[] with isAdmin / isSuperAdmin), and the full set of group flags (announce, restrict, ephemeral, community flags, …).

Creating a group

createGroup returns the full WaGroupMetadata for the new group — no need to call queryGroupMetadata afterward:

Managing participants

The four participant methods (addParticipants, removeParticipants, promoteParticipants, demoteParticipants) return a typed WaParticipantActionResult[] — one entry per jid you passed in. The IQ as a whole succeeds even when some participants fail (blocked you, privacy settings disallow add, already a member, …), so inspect the per-jid code to surface partial failures.
Each result also carries phoneNumber and username when the server resolved them, plus the raw BinaryNode under raw for any extra tags the server attached (some 409/408 partial failures hint at how to recover).

Group settings

setSetting also covers the boolean toggles ephemeral, group_history, allow_admin_reports, no_frequently_forwarded, and the community flags. Use it to flip a feature on or off; for settings that need a value (mode or duration), use the dedicated setters below.
All three are admin-only — non-admins receive a 403 not-authorized error.

Disappearing messages

setSetting(groupJid, 'ephemeral', false) is the explicit disable path. To turn disappearing messages on with a specific lifetime, use setEphemeralDuration:
Admin-only. Passing 0 disables disappearing messages — the same as setSetting('ephemeral', false).

Invites

queryInviteCode and revokeInvite are admin-only — non-admins receive a 403 not-authorized.

Leaving

leaveGroup resolves to void once the server acknowledges the request.

Membership approval

For groups that require admin approval to join:

Communities

Communities are parent groups that link sub-groups:
Other community operations include deactivateCommunity, transferCommunityOwnership, and fetchSubgroupSuggestions.

Sharing group history

When a new member joins a group whose memberShareGroupHistoryMode exposes the backlog, any existing member can push the recent messages to them directly. Both sides live on client.message.

Sending

shareGroupHistory(groupJid, input) resolves toJids against the live participant list, uploads the zlib-compressed GroupHistory payload, and fans the bundle out only to those receivers plus this account — members who are not receiving it never see the stanza. A group-wide notice message follows so other clients can render the “history was shared” marker. Input fields:
  • toJids — required. Written in the group’s own addressing mode (a LID-addressed group only matches @lid entries; a PN one only matches @s.whatsapp.net). Read the mode off client.group.queryGroupMetadata(), whose participants carry both forms. Anything else throws.
  • count?: number — how many of the most recent messages to read from the messages mailbox store. Ignored when messages is supplied.
  • sinceMs?: number — only read messages at or after this ms timestamp from the store. Ignored when messages is supplied.
  • messages?: readonly Proto.IWebMessageInfo[] — supply the messages directly, bypassing the mailbox store. Required when the messages store domain is 'none' (the default) — there is nothing to read back.
  • outOfWindowPinnedMessages?: readonly Proto.IWebMessageInfo[] — pinned messages older than the shared window; the receiver injects these regardless of the age cutoff.
WaShareGroupHistoryResult returns bundleMessageId, noticeMessageId? (absent when the notice failed to send after the bundle was already delivered — do not retry the share), messagesCount, historyReceivers, and nonHistoryReceivers.
The sender side is gated per account by the group_history_send AB prop. When it is off, the server rejects the stanza with SMAX_INVALID after the upload is spent, so the client checks the prop up front and throws before uploading. Admin-only groups (memberShareGroupHistoryMode: 'admin_share') reject a share from a regular member server-side — check the mode with queryGroupMetadata first.

Receiving

Downloading a bundle is opt-in — a bundle is media a third party pushes at this account unprompted. Enable it in the client config:
The receiver verifies this account is in historyReceivers before spending a CDN fetch, drops stubs / foreign-chat / age-expired / ephemeral-expired entries, persists the rest, and emits group_history_bundle. Out-of-window pins ride along exempt from the age cutoff. Window limits come from the server-synced AB props, not hardcoded defaults. Bundles derive their media keys from a Group History HKDF context — distinct from history sync’s WhatsApp History Keys. Bundles addressed to other members are dropped either way.

Group events

Changes made by others (subject, participants, settings) arrive on the group event:
See Events for the full payload.
Last modified on August 1, 2026