Using Clickatell's REST api in PHP -


i'm trying programmatically send sms messages in php code using rest api clickatell. i've got code:

<?php $message = "test message"; $numbers = array("1**********","1**********"); $data = json_encode(array("text"=>$message,"to"=>$numbers)); $authtoken = "none of buisness";  $ch = curl_init();  curl_setopt($ch, curlopt_url,            "https://api.clickatell.com/rest/message"); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_post,           1); curl_setopt($ch, curlopt_postfields,     $data); curl_setopt($ch, curlopt_httpheader,     array(     "x-version: 1",     "content-type: application/json",     "accept: application/json",     "authorization: bearer $authtoken" ));  $result = curl_exec ($ch);  echo $result ?> 

it seems work, because result i'm getting:

{ "data": {     "message":[         {             "accepted":true,             "to":"1**********",             "apimessageid":"e895a0e68089d76fa05f41046a186a70"         }     ] } } 

however, haven't received message on device. can debug or beyond me?

the apimessageid (tracking code) got not confirm actual delivery - means message has been accepted processing.

it looks sent message usa, account not have access usa. can contact support team assist setting up/getting correct account allows usa delivery.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -