Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send bulk message #29

Open
mrnoobnoobies opened this issue Oct 18, 2023 · 2 comments
Open

send bulk message #29

mrnoobnoobies opened this issue Oct 18, 2023 · 2 comments

Comments

@mrnoobnoobies
Copy link

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
Copy link
Owner

mimamch commented Dec 8, 2023

UP. I need PHP programmer here.

@sikasep23
Copy link

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants