SMS API for web developers (HTTP Client plugin)

This page provides information for web developers about how to install and configure an HTTP-SMS client for SMS messaging with Ozeki message Server 6. We also explain how to create and view HTTP log files.

Web applications communicate with the user with HTML forms. When a user wants to send information to the server, they fill out a form. The HTTP-SMS client plugin does the same. It fills out a form automatically every time an SMS message is received. The receiving web application can return a response SMS message after processing the received data.

INSTALLATION

The installation of the HTTP Client plugin is similar to that of the other plugins. To install the HTTP plugin, open the Ozeki message server 6 program by clicking on its icon in the bottom right-hand corner in the taskbar. Select Manage Service. In the login window, enter your username and password. Select Plugins/Installed plugins. See Figure 1.

selecting plugins or installed plugins
Figure 1 - Selecting Plugins/Installed Plugins

In the window opened, click on Install Plugins. See Figure 2.

clicking on install plugins
Figure 2 - Clicking on Install Plugins

In the list of plugins, select HTTP Client plugin, and click on Install (Figure 3).

selecting and installing the http client plugin
Figure 3 - Selecting and installing the HTTP Client plugin

CONFIGURATION

After you have installed the plugin, you can start to configure it.

To start the configuration, click on the Configure URL. If you would like the HTTP server of the plugin to start automatically when the Ozeki Message Server software starts, place a checkmark in the "Autoconnect on startup" checkbox and press OK (Figure 4.) The URL shows the 3rd party HTTP server.

automatic startup
Figure 4 - Automatic startup

You can select the HTTP method with the radio buttons. Leave the Operator name: text box blank. See Figure 5.

http method
Figure 5 - HTTP method

ROUTING INCOMING MESSAGES TO THE PLUGIN

To enable the HTTP plugin to receive messages, route the incoming SMS messages to it. To start this routing, click on Modify user properties in the Users menu. See Figure 6.

modifying user properties of the http plugin
Figure 6 - Modifying user properties of the HTTP plugin

Select the HTTP Client plugin 1 from the list and click on the Modify button. In the new window, check in the Incoming messages: checkbox.(Figure 7 .)

checking in incoming messages
Figure 7 - Checking in incoming messages

TURNING ON LOGGING

You can create the HTTP log file if you turn on logging. To do this, select Server preferences in the Edit menu. See Figure 8.

selecting server preferences
Figure 8 - Selecting Server preferences

Click on the Event logs tab and check in the Server events checkbox (Figure 9.)

checking in server events in the event logs window
Figure 9 - Checking in Server events in the Event logs window

After the configuration, click on Connect and on Refresh this page to connect the plugin in the window of currently installed plugins. See Figure 10.

connecting the plugin
Figure 10 - Connecting the plugin

STARTING SENDING AND RECEIVING SMS

Send an SMS to the phone attached to the PC. This will trigger the HTTP client request. The http client request means that a webpage from a specified webserver is downloaded. If this webpage returns plain text content containing one more line with this syntax, response SMS messages can be generated.

{SMS:TEXT}{}{+36205555224}{+36201111245}{Thank you for the answer}

In this format the +36205555224 number is the sender number. It is optional. The +36201111245 recipient number and the message text is mandatory.

VIEWING THE LOG

To check the plugin functionality, open the log file:
C:\Program Files\Ozeki\Ozeki Message Server\Logs\HTTP Client plugin 1-cache.txt (Figure 11).

the log file path
Figure 11 - The log file path

log entry
Figure 12 - Log entry

More information