Retailer magic: SMS strategies for Winter | On Demand Sign up for our webinar
Allows you to add a single or multiple numbers to your Blacklist.
https://
www.voodooSMS.com/vapi/server/addToBlacklist
Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
case "GET":
$uid = htmlspecialchars($_GET["uid"]);
$pass = htmlspecialchars($_GET["pass"]);
$cc = htmlspecialchars($_GET["cc"]);
$cli = htmlspecialchars($_GET["cli"]);
break;
case "POST":
$uid = htmlspecialchars($_POST["uid"]);
$pass = htmlspecialchars($_POST["pass"]);
$cc = htmlspecialchars($_POST["cc"]);
$cli = htmlspecialchars($_POST["cli"]);
break;
}
$url = 'https://www.voodoosms.com/vapi/server/addToBlacklist?uid='.$uid.'&pass='.$pass.'&cc='
.$cc.'&cli='.$cli;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
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</result>
<message>Success</message>
<numbers>
<number>447700900600</number>
</numbers>
</xml>
Allows you to remove a single or multiple numbers from your Blacklist.
https://
www.voodooSMS.com/vapi/server/removeBlacklistNumber
Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
case "GET":
$uid = htmlspecialchars($_GET["uid"]);
$pass = htmlspecialchars($_GET["pass"]);
$number = htmlspecialchars($_GET["number"]);
break;
case "POST":
$uid = htmlspecialchars($_POST["uid"]);
$pass = htmlspecialchars($_POST["pass"]);
$number = htmlspecialchars($_POST["number"]);
break;
}
$url = 'https://www.voodoosms.com/vapi/server/removeBlacklistNumber?uid='.$uid.'&pass='.$pass.'&number='.$number;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
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</result>
<message>The blacklisted number has been removed</message>
</xml>
API call which retrieves the current blacklist numbers. If the blacklist is empty, the response will not contain any <item> elements and the count will be 0.
https://
www.voodooSMS.com/vapi/server/getBlacklistNumbers
Request
<?php
switch($_SERVER["REQUEST_METHOD"]) {
case "GET":
$uid = htmlspecialchars($_GET["uid"]);
$pass = htmlspecialchars($_GET["pass"]);
break;
case "POST":
$uid = htmlspecialchars($_POST["uid"]);
$pass = htmlspecialchars($_POST["pass"]);
break;
}
$url = 'https://www.voodoosms.com/vapi/server/getBlacklistNumber?uid='.$uid.'&pass='.$pass;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
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>
<total_blacklisted_numbers>3</total_blacklisted_numbers>
<blacklist>
<number>
<item>447000000000</item>
<item>447000000001</item>
<item>447000000002</item>
</number>
</blacklist>
</xml>