Group metadata
Method#
/group-metadata#
GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/group-metadata
Header#
| Key | Value |
|---|---|
| Client-Token | ACCOUNT SECURITY TOKEN |
Concept#
This method returns the group metadata with all information about the group and its participants.
Attention
On November 4, 2021 whatsapp changed the format of creating new groups. before: "phone": "5511999999999-1623281429" now: "phone": "120363019502650977-group"
Attributes#
Required#
| Attributes | Type | Description |
|---|---|---|
| groupId | string | Groups ID/phone |
Optionals#
| Attributes | Type | Description |
|---|
Request Params#
URL#
POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/group-metadata/{phone}
Response#
200#
| Attributes | Type | Description |
|---|---|---|
| phone | string | Group ID/phone |
| description | string | Group description |
| owner | string | Group creators number |
| subject | string | Group’s name |
| creation | timestamp | Group creation date timestamp |
| invitationLink | url | Group invitation link |
| invitationLinkError | string | Mensagem de erro caso invitationLink seja nulo (forbidden, not-authorized, too many requests) |
| communityId | string | Community ID |
| adminOnlyMessage | boolean | Only admins can send messages |
| adminOnlySettings | boolean | Only admins can change settings |
| requireAdminApproval | boolean | Admin approval required |
| isGroupAnnouncement | boolean | Community announcement group |
| participants | array string | with participant data |
Array String (participants)
| Atributos | Tipo | Descrição |
|---|---|---|
| phone | string | Participants phone |
| isAdmin | string | Indicates if the participant is the group’s admin |
| isSuperAdmin | string | Indicates whether you are the creator of the group |
Example
405#
In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.