Skip to main content

Overview

Group metadata contains comprehensive information about a WhatsApp group, including its participants, settings, description, and various configuration options.

Fetching Group Metadata

Use the groupMetadata method to retrieve complete information about a group.

Function Signature

Parameters:
  • jid - The group JID (e.g., '123456789@g.us')
Returns: A GroupMetadata object containing all group information

Basic Example

Complete Usage

GroupMetadata Interface

The complete structure of group metadata:

GroupParticipant Interface

Each participant in the group has the following structure:

Working with Participants

List All Participants

Get Admins Only

Check if User is Admin

Check if User is Super Admin (Creator)

Checking Group Settings

Display All Settings

Check Specific Setting

Fetching All Participating Groups

Get metadata for all groups you’re a member of.

Function Signature

Fetch All Groups

Complete Example

Filter Groups by Criteria

Description Metadata

Working with group descriptions:

Community Groups

Check if a group is part of a community:

Complete Analysis Function

Comprehensive group analysis:
1

Fetch and analyze

2

Export data

Best Practices

Caching: Group metadata doesn’t change frequently. Consider caching it to reduce API calls.
Events: The library emits 'groups.update' events when metadata changes. Listen to these events to keep your cache updated.
Privacy: Be careful when storing or displaying participant information. Respect user privacy.

Efficient Metadata Usage