Received SMS

This API call will return any inbound SMS received

Definition

http:// or https:// www.voodooSMS.com/vapi/server/getSMS

Methods

GET
POST

Parameters

Required Fields

to: Ending date of required data (Optional)
from: Starting date of required data (Optional)
keyword: Filter for message body (Optional)
vmn: The number the SMS was sent to, Format Ex: (447xxxxxxxxx) (Optional)
eref: Your external reference number from the original Send SMS (Optional)
uid: System allocated username for API user configured within the VoodooSMS.com Portal in ‘Send SMS>API Management’
pass: System password for API user configured within the VoodooSMS.com Portal in ‘Send SMS>API Management’

Received SMS Dummy Text

Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
    case "GET":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $from = htmlspecialchars($_GET["from"]);
        $to = htmlspecialchars($_GET["to"]);
        $keyword = htmlspecialchars($_GET["keyword"]);
        $vmn = htmlspecialchars($_GET["vmn"]);
        $eref = htmlspecialchars($_GET["eref"]);
        break;
    case "POST":
        $uid = htmlspecialchars($_GET["uid"]);
        $pass = htmlspecialchars($_GET["pass"]);
        $from = htmlspecialchars($_GET["from"]);
        $to = htmlspecialchars($_GET["to"]);
        $keyword = htmlspecialchars($_GET["keyword"]);
        $vmn = htmlspecialchars($_GET["vmn"]);
        $eref = htmlspecialchars($_GET["eref"]);
        break;
}

$url = 'https://www.voodoosms.com/vapi/server/getSMS?uid='.$uid.'&pass='.$pass.'&from='.$from.
        '&to='.$to."&keyword=".$keyword."&vmn=".$vmn."&eref=".$eref;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
// Download the given URL, and return output
$output = curl_exec($ch);
echo $output . "   " . curl_error($ch);
// Close the cURL resource, and free system resources
curl_close($ch);
?>
Response
<xml>
   <result>200 OK</result>
   <messages>
      <message>
         <Message>yes approved, next month ceremony hai ..</Message>
         <TimeStamp>2014-10-29 18:12:18</TimeStamp>
         <Originator>447709364755</Originator>
      </message>
      <message>
         <Message>Cool, was nice to catch up with u yesterday after a long time</Message>
         <TimeStamp>2014-10-29 18:13:20</TimeStamp>
         <Originator>447709364755</Originator>
      </message>
   </messages>
</xml>