Send Group message
How to create a WhatsApp group or send messages to the group
Last updated
How to create a WhatsApp group or send messages to the group
Last updated
To send a message to a group you need to know the group ID.
You can get the group ID in several ways:
When you create a group, the group ID will be specified in the response from the API;
Get a list of groups (method: https://whapi.readme.io/reference/getgroups );
Get a list of all chats (method: https://whapi.readme.io/reference/getchats );
The group ID looks like this: 120363194020948049@g.us. This information cannot be seen in the application or Web version!
Once you know the group ID, you can use the method to send any message. For example, a text message
In the โtoโ parameter you insert the ID of the group you want to send the message to. And in the โbodyโ, the text of the message
Now that your group is up and running, it's time to acquire its unique identifier. Make a quick call to /getgroup and you'll have what you need.
With the identifier in your grasp, you're all set to spread the word! Use POST /sendmessagetext to shower your group with your initial messages.
Send your first WhatsApp message in group.
For a detailed breakdown of the messaging method, including a comprehensive description of all parameters, additional examples, and options for testing, please visit our Developer Hub at:
'to': The recipientโs WhatsApp number with international format e.g., 14409416972 or chatID for contact or group e.g 14409416972@s.whatsapp.net or 120363194020948049@g.us
'body' : Message text.
We offer a convenient service for testing requests and using ready-made code fragments in any programming language. You will only need to transfer the saved API-token and fill in the required parameters:
Save the PHP script and run it on your server. The specified message will be sent to the specified WhatsApp number. Remember to replace variables with your actual details.
Please note that this is a basic example and doesn't include any error handling. For a production environment, ensure to add appropriate error and exception handling.
Enjoy communicating with your users on a platform they love and use daily! Please don't hesitate to reach out to share your experiences or pose any questions you might have.