This method retrieves opt-outs for a message.


Parameters



  • message_id - integer - message identifier

  • offset - integer - where to begin reading the dataset from

  • limit - integer - the number of responses to return


 




 




XML Request Example


<?xml version='1.0'?>

<request>
<interface>PHP</interface>
<version>0.3</version>
<key>API_KEY</key>
<secret>API_SECRET</secret>
<method>messages.opt-outs</method>
<params>
<message_id>28326</message_id>
<offset>0</offset>
<limit>1000</limit>
</params>
</request>







XML Response Example


<?xml version='1.0'?>

<xml>
<method>messages.opt-outs</method>
<total>4</total>
<time>2010-04-21 04:16:33 GMT</time>
<timestamp>1271823393 GMT</timestamp>
<dataset>
<data>
<firstname>Bob</firstname>
<lastname>Dobbalina</lastname>
<mobile>61406????52</mobile>
<datetime_entry_orig>2010-01-22 04:05:35</datetime_entry_orig>
<datetime_entry_local>2010-01-22 07:05:35</datetime_entry_local>
</data>
</dataset>
</xml>






PHP Example


Download the PHP API Client


<?php


// change api key and secret to your own
$myAPIKey = "API_KEY";
$myAPISecret = "API_SECRET";

// include base class
require('APIclient.php');

// create new client object
$transmitsmsAPI = new transmitsmsAPI($myAPIKey, $myAPISecret);

// set parameters
$message_id = 1076;
$offset = 0;
$limit = 10;

// execute request
$methodResponse = $transmitsmsAPI->getMessageOptOuts($message_id, $offset, $limit);

// parse response into xml object
$xml = @simplexml_load_string($methodResponse);
echo '<pre>';
print_r($xml);
echo '</pre>';

?>