Ozeki NG SMS Gateway

How to redirect the browser with the http sms api?

This example posts an SMS message to the SMS gateway, then redirects the browser to an url. The url in the example is http://www.yourdomain.com

How to redirect the browser after sms submit?

To redirect the borwser with the http api
  1. Create the HTTP sms api URL prefix
  2. Add the sendmessage parameter to send sms
  3. Append the username and password
  4. Add the sms recipient
  5. Type the sms text as normal and use urlencoding
  6. Set the redirect parameter
  7. Submit the sms
  8. Watch the browser jump to the requested page

Example request:

http://127.0.0.1:9501/api?action=sendmessage&username=admin&password=abc123&
recipient=06203105366&messagetype=SMS:TEXT&messagedata=Hello+World&redirecturl=http%3A%2F%2Fwww.yourdomain.com

Example response:


HTTP/1.1 302 Found
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Length: 440
Content-Type: text/xml
Last-Modified: Wed, 13 Feb 2008 23:19:47 GMT
Location: http://www.yourdomain.com
Server: OzekiNG/3.0.1 Microsoft-HTTPAPI/1.0
Date: Wed, 13 Feb 2008 22:19:46 GMT

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE response PUBLIC "-//OZEKI//DTD XML 1.0//EN" "http://192.168.91.10:9501/DTD/response.xml">
<response>
  <action>sendmessage</action>
  <data>
    <acceptreport>
      <statuscode>0</statuscode>
      <statusmessage>Message accepted for delivery</statusmessage>
      <messageid>ROTTTZFS</messageid>
      <recipient>06203105366</recipient>
    </acceptreport>
  </data>
</response>

More information