Tired of looking for an API that allows you to send WhatsApp messages to groups automatically? Don’t wait anymore. Wassenger has what you have been looking for!
With Wassenger’s powerful API, you can send messages to WhatsApp groups automatically, keeping your community engaged, your sales team updated, and your customers happy — without the hassle! Let’s dive in and see how you can automate group messages effortlessly. 🚀
🔥 Why Automate WhatsApp Group Messages?
Managing WhatsApp groups manually can be time-consuming and chaotic. Here’s why automation is a game-changer:
✅ Save Time — No more copy-pasting the same message in different groups. ✅ Consistency — Ensure that every group receives timely updates. ✅ Efficiency — Schedule messages in advance and let Wassenger do the work. ✅ Engagement — Keep your audience informed without spamming them.
Sounds amazing, right? Let’s see how to make it happen! 👇
🛠️ How to Send Automated Messages to WhatsApp Groups with Wassenger
With Wassenger’s API, sending messages to a WhatsApp group is as simple as making an API request. Here’s how to do it in different programming languages! 🚀
Requirements
- Having a WhatsApp number already linked to the platform and online.
- Channel ID (WID) which can be found in two ways:
- On your WhatsApp number’s management panel, go to “channels”. From there you will see the channels your number has access to.
- Using the API, query the available channel in your device for this endpoint.
1️⃣ Basic API Request to Send a WhatsApp Group Message
📌 API Endpoint with POST method:
https://api.wassenger.com/v1/messages
Required HTTPS headers > Obtain your API key here
Content-Type: application/json
Token: $API_TOKEN
📌 Request Body Example:
{
"group": "1234567890@g.us",
"message": "🚀 Hey team! Don't forget our meeting at 3 PM today.See you there!"
}
And boom! 💥 Your message is on its way to the WhatsApp group!
Are you a developer?
Explore how to use the code in your browser without installing any software
Also, you can find different languages you can test on Replit.com:
💻 Code Examples in Different Languages 🧑💻
Node
// This code example requires you to have installed node-fetch Node.js package.
// Install it by running: npm install --save node-fetch or yarn add node-fetch
const fetch = require('node-fetch');
const url = 'https://api.wassenger.com/v1/messages';
const options = {
method: 'POST',
headers: { 'Content-Type': 'application/json', Token: 'API KEY GOES HERE' },
body: '{"group":"group_id@g.us", "message":"Sample group message"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
Node (Axios)
const axios = require('axios').default;
const options = {
method: 'POST',
url: 'https://api.wassenger.com/v1/messages',
headers: { 'Content-Type': 'application/json', Token: 'API KEY GOES HERE' },
data: { group: 'group_id@g.us', message: 'Sample group message' }
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Node (Unirest)
// This code example requires you to have installed unirest Node.js package.
// Install it by running: npm install --save unirest or yarn add unirest
const unirest = require('unirest');
const req = unirest('POST', 'https://api.wassenger.com/v1/messages');
req.headers({
'Content-Type': 'application/json',
Token: 'API KEY GOES HERE'
});
req.type('json');
req.send({
group: 'group_id@g.us',
message: 'Sample group message'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
PHP (Guzzle)
// This code example requires to have installed Guzzle package, a flexible and elegant HTTP client for PHP.
// Install it first following these instructions:
// https://docs.guzzlephp.org/en/stable/overview.html#installation
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.wassenger.com/v1/messages', [
'body' => '{"group":"group_id@g.us", "message":"Sample group message"}',
'headers' => [
'Content-Type' => 'application/json',
'Token' => 'API KEY GOES HERE',
],
]);
echo $response->getBody();
PHP (http2)
// This code example requires to have installed pecl_http package, a simple and elegant HTTP client for PHP.
// Install it by running: pecl install pecl_http
// More information: https://mdref.m6w6.name/http
<?php
$client = new http\Client();
$request = new http\Client\Request();
$body = new http\Message\Body();
$body->append(
json_encode([
'group' => 'group_id@g.us',
'message' => 'Sample group message',
])
);
$request->setRequestUrl('https://api.wassenger.com/v1/messages');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Token' => 'API KEY GOES HERE',
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
PHP (curl)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.wassenger.com/v1/messages',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([
'group' => 'group_id@g.us',
'message' => 'Sample group message',
]),
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Token: API KEY GOES HERE',
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo 'cURL Error #:' . $err;
} else {
echo $response;
}
Python
# Examples requires to have installed requests Python package.
# Install it by running: pip install requests
import requests
url = "https://api.wassenger.com/v1/messages"
payload = {
"group": "group_id@g.us",
"message": "Sample group message"
}
headers = {
"Content-Type": "application/json",
"Token": "API KEY GOES HERE"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Go
package main
import(
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url:= "https://api.wassenger.com/v1/messages"
payload:= strings.NewReader("{\"group\":\"group_id@g.us\", \"message\":\"Sample group message\"}")
req, _:= http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Token", "API KEY GOES HERE")
res, _:= http.DefaultClient.Do(req)
defer res.Body.Close()
body, _:= io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
C# (RestClient)
// This code requires you to have installed RestSharp package.
// Documentation: https://restsharp.dev
// Installation: https://www.nuget.org/packages/RestSharp
var client = new RestClient("https://api.wassenger.com/v1/messages");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Token", "API KEY GOES HERE");
request.AddParameter("application/json", "{\"group\":\"group_id@g.us\", \"message\":\"Sample group message\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
C# (HttpClient)
// This code uses the built-in HttpClient package in the.NET framework.
// Documentation: https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-6.0
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.wassenger.com/v1/messages"),
Headers =
{
{ "Token", "API KEY GOES HERE" },
},
Content = new StringContent("{\"group\":\"group_id@g.us\", \"message\":\"Sample group message\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using(var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
🕒 Schedule Group Messages for the Future
Want to schedule your messages to be sent at a specific time? 🕰️ No problem! Just add the "deliverAt" parameter.
{
"group": "1234567890@g.us",
"message": "🚀 Reminder: Our sales meeting is tomorrow at 10 AM!",
"deliverAt": "2025-02-03T10:00:00Z"
}
Find how to do it from our LIVE API TESTER 💪
Your message will be automatically sent at the scheduled time — perfect for reminders, promotions, and event notifications! 🎉
🎯 Bonus: Mention Group Participants in Your Message
Want to tag users in your WhatsApp group messages? You can do it easily! 👇
{
"group": "1234567890@g.us",
"message": "Hey @1234567890, don’t forget to check the new updates! 🚀"
}
Find how to do it from our LIVE API TESTER 💪
This way, you can call out specific participants, making the communication more personalized! 🔥
🚀 Get Started with Wassenger Today!
Automating WhatsApp group messages has never been easier. With Wassenger, you can send, schedule, and automate all your group messages like a pro! 💪
🔗 Start automating now! 🚀 Sign up for Wassenger today at Wassenger and supercharge your WhatsApp messaging with easy automation, detailed API documentation, and 24/7 support. Don’t miss out on scaling your business with seamless WhatsApp integration. Get Started Here! 🚀
📣 Ready to Take Your WhatsApp Messaging to the Next Level?
👉 Explore more API features and tutorials: Wassenger API Docs 👉 Create and manage your WhatsApp numbers: Manage Numbers 👉 Join the Wassenger community and stay ahead of the curve! 💡🎯
What are you waiting for? 🚀 Let’s automate your WhatsApp game with Wassenger today! 🔥







