mirror of
https://github.com/mimamch/wa-gateway.git
synced 2026-04-25 08:55:49 +03:00
[GH-ISSUE #29] send bulk message #17
Labels
No labels
bug
documentation
invalid
pull-request
question
request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wa-gateway-mimamch#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mrnoobnoobies on GitHub (Oct 18, 2023).
Original GitHub issue: https://github.com/mimamch/wa-gateway/issues/29
Hi, i need some example on how to use POST /send-bulk-message
how to use it using php curl?
as i've succeed to be using POST /send-message, i need some example on how to use send bulk message
tq
@mimamch commented on GitHub (Dec 8, 2023):
UP. I need PHP programmer here.
@sikasep23 commented on GitHub (Apr 5, 2024):
there u go.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://localhost:5001/send-bulk-message',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 5000,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"session": "Session",
"data":[
{
"to":"628XXXXXXXX",
"text": "text 1"
},
{
"to":"628XXXXXXXX",
"text": "text 2"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;