Why am I not getting a group name?#
Not having a name for a WhatsApp group can cause a number of inconveniences for both end users and integration developers.
Why there is no group name?#
When creating a WhatsApp group, either through the mobile app or the web interface, users can leave the group name blank.
If the name is not specified, the system does not assign a default value to it, leaving the field blank.
This results in missing data in some parameters used to identify the group.
How does this affect data retrieval in the API?#
Incoming notifications#
In notifications about new messages, the chatname
field can be empty.
This makes it difficult to understand which group the message came from.
Notification example:
{
"typeWebhook": "outgoingMessageReceived",
"instanceData": {
"idInstance": 1103860726,
"wid": "79876543210@c.us",
"typeInstance": "whatsapp"
},
"timestamp": 1729571097,
"idMessage": "5125D25A22E6C5D3C2E441C3A98023BB",
"senderData": {
"chatId": "120363352639283697@g.us",
"chatName": "",
"sender": "79876543210@c.us",
"senderName": "John",
"senderContactName": "John Doe"
},
"messageData": {
"typeMessage": "textMessage",
"textMessageData": {
"textMessage": "Hi"
}
}
}
Method getGroupData#
The subject
field containing the group name will be empty.
This complicates automatic processing of group data.
Response body example:
{
"groupId": "120363352639283697@g.us",
"owner": "79876543210@c.us",
"subject": "",
"creation": 1729571084,
"participants": [
{
"id": "79876543210@c.us",
"isAdmin": false,
"isSuperAdmin": false
},
{
"id": "79987654321@c.us",
"isAdmin": true,
"isSuperAdmin": true
},
{
"id": "79998765432@c.us",
"isAdmin": false,
"isSuperAdmin": false
}
],
"subjectTime": null,
"groupInviteLink": ""
}
Method getContacts#
The name
field, which usually contains the name of the group, will also be empty.
This makes it difficult to display the list of contacts and groups.
Response body example:
{
"id": "120363352639283697@g.us",
"name": "",
"type": "group"
}
Solution#
To avoid such situations, it is recommended to always specify a group name when creating it, even if it is temporary.
You can specify the group name via API using the UpdateGroupName method