Skip to content

Instantly share code, notes, and snippets.

@codesbandit
Created October 11, 2023 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codesbandit/9248b10f6bd165458b6913cda1c5912c to your computer and use it in GitHub Desktop.
Save codesbandit/9248b10f6bd165458b6913cda1c5912c to your computer and use it in GitHub Desktop.
send message goowa
$token = "xxxx";
$phone= "62812xxxxxx"; //untuk group pakai groupid contoh: 62812xxxxxx-xxxxx
$message = "Testing by API Goowa";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://goowa.id/api/send_message',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'token='.$token.'&number='.$phone.'&message='.$message,
));
$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