Difference between revisions of "Examples And Concepts"

From SMS Wiki
Jump to: navigation, search
(Receiving SMS)
(Receiving SMS)
Line 16: Line 16:
 
You can use the following HTML to emulate what our server will send your service.
 
You can use the following HTML to emulate what our server will send your service.
  
<pre>
+
<source lang="php">
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
 
<html>
 
<html>
Line 72: Line 72:
 
</html>
 
</html>
  
</pre>
+
</source>

Revision as of 11:01, 28 March 2007

SOAP API Usage

Every function of the SOAP API that requires authentication must pass in Authentication Parameters, to acquire a set of Authentication Parameters, please use the API found at: http://api.upsidewireless.com/soap/Authentication.asmx

Sending SMS

Receiving SMS

The method of receiving Inbound SMS messages is by way of HTTP POST. A few variables are passed in the body of the POST.

  • name
  • sender
  • data
  • carriercode << For shortcode accounts only
  • inboundnumber << For Dedicated accounts only

In order to receive an SMS you must first register a URL in your account. Your account must be enabled to allow adding of URLs. Once your account has the registered URL set up, you will then need to forward all inbound SMS messages to that URL.

You can use the following HTML to emulate what our server will send your service.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Received SMS Emulator (Via HTTP POST)</title>
	</head>
	<body>
		<form id="emulator" name="emulator" method="post" action="http://sms.yourdomain.com/incoming.php">
			<table>
				<tr>
					<td>Sender:</td>
					<td>
						<input name="sender" type="text" id="sender" value="17789964283"/>
					</td>
					<td>sender</td>
				</tr>
				<tr>
					<td>Message:</td>
					<td>
						<input name="data" type="text" id="data" value="Hello"/>
					</td>
					<td>data</td>
				</tr>
				<tr>
					<td>User Name:</td>
					<td>
						<input name="name" type="text" id="name" value="cjensen"/>
					</td>
					<td>name</td>
				</tr>
				<tr>
					<td>Inbound Number:</td>
					<td>
						<input name="inboundnumber" type="text" id="inboundnumber" value="16047807002"/>
					</td>
					<td>inboundnumber</td>
				</tr>
				<tr>
					<td>Carrier Code:</td>
					<td>
						<input name="carriercode" type="text" id="carriercode"/>
					</td>
					<td>carriercode</td>
				</tr>
				<tr>
					<td colspan="2" align="right">
						<input type="submit" name="Submit" value="Submit"/>
					</td>
					<td>&nbsp;</td>
				</tr>
			</table>
		</form>
	</body>
</html>