We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!

This method returns a list of replies from a particular responder. You can either search through all of your keywords, or limit search to number or keyword.


Parameters:


  • mobile - integer - responder mobile, in international format
  • longcode - integer - limits search to the defined number
  • keyword - integer - limits search to the defined keyword (ID or exact name)


 Use cases: 


You are running a promo campaign with several keywords, but you want your clients to receive bonus only once. You use this function in response campaign plugin, to see if this recipient already subscribed to any of your campaigns (you may filter this by number, if you have several numbers). If this mobile hasn't already responded to your campaign - you send SMS with bonus info, otherwise - a duplicate message info.


You have complex keyword, where client should send 2 SMS, one with keyword and another with email. You need to bind email to previously sent keyword, so you use this function in a plugin to get which reply did you get from this number before, check it against your keyword list and see if you have a match.


 




 




XML Request Example


<?xml version='1.0'?>

<request>

	<interface>PHP</interface>

	<version>0.4</version>

	<key>API_KEY</key>

	<secret>API_SECRET</secret>

	<method>keywords.responder</method>

	<params>

		<mobile>614111111111</mobile>

		<longcode/>

		<keyword/>

	</params>

</request>








XML Response Example


<?xml version='1.0'?>

<xml>

	<method>keywords.responder</method>

	<total>4</total>

	<time>2009-12-21 23:08:45 GMT</time>

	<timestamp>1261436925 GMT</timestamp>

	<dataset>

		<data>

			<firstname></firstname>

			<lastname></lastname>

			<mobile>6141111111</mobile>

			<response>test</response>

			<datetime_entry_orig>2012-08-21 11:51:45</datetime_entry_orig>

		</data>

		<data>



			<firstname></firstname>

			<lastname></lastname>

			<mobile>6141111111</mobile>

			<response>test</response>

			<datetime_entry_orig>2012-08-21 11:49:25</datetime_entry_orig>

		</data>

		<data>



			<firstname></firstname>

			<lastname></lastname>

			<mobile>6141111111</mobile>

			<response>test</response>

			<datetime_entry_orig>2012-08-21 11:47:27</datetime_entry_orig>

		</data>

		<data>



			<firstname></firstname>

			<lastname></lastname>

			<mobile>6141111111</mobile>

			<response>test</response>

			<datetime_entry_orig>2012-08-21 11:45:25</datetime_entry_orig>

		</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

$mobile=6140000000;





// execute request

$methodResponse = $transmitsmsAPI->getKeywordResponder($mobile);



// parse response into xml object

$xml = @simplexml_load_string($methodResponse);



echo 'There are ' . $xml->total . ' responses<hr />';

foreach ($xml->dataset->data as $keyword) {

	echo 'Response ' . (string) $keyword->response . ' was at ' . (string) $keyword->datetime_entry_orig . '<br />';

}



?>






GET Example


Using a URL based request system you can request this method by using the below URL - be sure to url encode all your variables!


http://burst.transmitsms.com/api-wrapper/keywords.responder?apikey=API_KEY&apisecret=API_SECRET&mobile=61400000000