[GH-ISSUE #29] send bulk message #17

Open
opened 2026-02-27 10:23:50 +03:00 by kerem · 2 comments
Owner

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

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
Author
Owner

@mimamch commented on GitHub (Dec 8, 2023):

UP. I need PHP programmer here.

<!-- gh-comment-id:1846535701 --> @mimamch commented on GitHub (Dec 8, 2023): UP. I need PHP programmer here.
Author
Owner

@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;

<!-- gh-comment-id:2040569753 --> @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;
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wa-gateway-mimamch#17
No description provided.