Skip to main content

Group Metadata by invite

Method#

/group-invitation-metadata#

GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/group-invitation-metadata?url={ URL }

Header#

KeyValue
Client-TokenACCOUNT 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"


Response#

200#

AttributesTypeDescription
phonestringGroup ID/phone
ownerstringGroup creators number
subjectstringGroup’s name
creationtimestampGroup creation date timestamp
participantsarray stringwith participant data

Array String (participants)

AtributosTipoDescrição
phonestringParticipants phone
isAdminstringIndicates if the participant is the group’s admin
isSuperAdminstringIndicates whether you are the creator of the group
shortstringParticipant’s short name
namestringParticipant’s name

Example

Old way -
{
"phone": "5511999999999-1623281429",
"owner": "5511999999999",
"subject": "My group on whatsapp",
"creation": 1588721491000,
"participants": [
{
"phone": "5511888888888",
"isAdmin": false,
"isSuperAdmin": false
},
{
"phone": "5511777777777",
"isAdmin": true,
"isSuperAdmin": false,
"short": "ZAPIs",
"name": "ZAPIs Boys"
}
],
"subjectTime": 1617805323000,
"subjectOwner": "554497050785"
}
------------------------------------
New way -
{
"phone": "120363019502650977-group",
"owner": "5511999999999",
"subject": "My group on whatsapp",
"creation": 1588721491000,
"participants": [
{
"phone": "5511888888888",
"isAdmin": false,
"isSuperAdmin": false
},
{
"phone": "5511777777777",
"isAdmin": true,
"isSuperAdmin": false,
"short": "ZAPIs",
"name": "ZAPIs Boys"
}
],
"subjectTime": 1617805323000,
"subjectOwner": "554497050785"
}

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.

415#

In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”


Code#