Difference between revisions of "Examples And Concepts"
Old-user20 (Talk | contribs) |
(→Sending SMS) |
||
Line 5: | Line 5: | ||
=== Sending SMS === | === Sending SMS === | ||
+ | |||
+ | Sending an SMS can be handled by way of sending us an SMTP message or via our HTTP Interface. | ||
=== Receiving SMS === | === Receiving SMS === |
Revision as of 14:23, 11 May 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
The two values that are returned from the function are then used for every subsequent calls to the API. The Token parameter will never change for the life of the account whereas the Signature will change if your password changes. In most applications, you will store these variables in a constant or configuration store.
Sending SMS
Sending an SMS can be handled by way of sending us an SMTP message or via our HTTP Interface.
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>