Send Location
Note :
in case the token not authorized , the message will add to queue and will be sent when the WhatsApp token is ready.
Request URL
https://api.wachat.net/send
Request body
token *Required
receiver *Required

Phone number with international format e.g. 6287766969318

msgtext *Required

Message text, UTF-8 or UTF-16 string


Rest API

 $url = 'https://api.wachat.net/send';

 $data = [
   'receiver' => '$receiver',
   'msgtext' => 'location',
   'token' => '$token',
   'poll' =>  [
        'degreesLatitude' => '24.232483',
        'degreesLongitude' => '55.692107',
        'locationName' => 'Jakarta',
        'locationAddress' => 'Indonesia',
      ]
 ];

 $ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER,  ['Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 $response = curl_exec($ch);
curl_close($ch);

echo $response; // output {success:true} or {success:false}

Note : don't forget to URL encode your query params like base64 or utf-8