Difference between revisions of "Examples And Concepts"
From SMS Wiki
Old-user20 (Talk | contribs) (→Receiving SMS) |
|||
Line 13: | Line 13: | ||
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. | 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. | ||
+ | |||
+ | <pre> | ||
+ | <!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> </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </form> | ||
+ | </body> | ||
+ | </html> | ||
+ | |||
+ | </pre> |
Revision as of 10:44, 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> </td> </tr> </table> </form> </body> </html>