Skip to content

Instantly share code, notes, and snippets.

@sutanto1010
Last active December 7, 2021 02:04
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 sutanto1010/e7d5667a292a67905ef490313d8b5643 to your computer and use it in GitHub Desktop.
Save sutanto1010/e7d5667a292a67905ef490313d8b5643 to your computer and use it in GitHub Desktop.
<?php
$url = 'https://api.brader.id/sm/wa/send/v1';
$ch = curl_init($url);
$jsonData = array(
'to' => '08xxxxxxxxxx',
'from' => '08xxxxxxxxxx',
'body' => 'Message that you want to send'
);
$header = array('Content-Type: application/json', 'ApiKey: Your API Key');
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$result = curl_exec($ch);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment