HTTP SMS API

The http sms api is a great option to send and receive text messages from your applications. No matter what kind of programming language you use you can issue HTTP requests very easily. This can be used to send SMS messages to mobile phones and can be used to download SMS messages from the SMS gateway if you want to receive texts.

What is the http sms api

The http sms api is a software interface provided by Ozeki SMS Gateway that allows you to send and receive text messages using the http or https protocols through the sms gateway.

How to send an sms using the http sms api

To send an sms using the http sms api
  1. Install Ozeki SMS Gateway
  2. Create a http sms api user
  3. Urlencode the sms text you wish to send
  4. Compose the HTTP GET url
  5. Call the HTTP request to send the SMS
  6. Receive the HTTP GET response
  7. Look for the statuscode and the error message
  8. Check your mobile to see the sent sms

Use the built in HTTP server of Ozeki NG to send SMS

Ozeki NG SMS Gateway has a built in webserver. To send an SMS message you can submit it using a HTTP request (Figure 1). To send your SMS messages you can simply call an URL (HTTP Get) or you can use the HTTP Post method. After the sms is posted, Ozeki NG SMS Gateway will forward it to the mobile network either using an Android mobile or GSM modem attached to your comptuer via a data cable or through the Interet using an IP SMS connection. Ozeki will also return a http sms status report in the http response to let your application know what happened to your SMS.

http sms api
Figure 1 - Send an SMS through the built in HTTP webserver using the HTTP sms api

The following links give you detailed information about how to form the URL and what kind of parameters you can use to send your text message:

How to send a text message (HTTP API specification)
How to send many SMS messages with a single HTTP request
How to send a text message (C# example)

Use the built in webserver to download incoming SMS

When an SMS message arrives to the Ozeki NG SMS gateway, it is stored in a message folder, called inbox. If you want to check incoming SMS messages one of your options is to download the contents of the inbox folder using HTTP. The following URL gives more information about how to download the contents of a message folder:

How to download incoming SMS messages

Processing incoming messages

If you want to process incoming SMS messages as soon as they arrive to your system, you may want to setup an HTTP Client user in Ozeki NG SMS Gateway. This HTTP Client user can forward incoming messages to your web application(s) as HTTP GET or HTTP POST requests (Figure 2).

http post on incoming sms messages
Figure 2 - HTTP Post on incoming SMS messages

The following webpage gives information on how to configure Ozeki NG to forward your SMS messages to an external web application:

HTTP Client user

Note that you can write this external web application in any programming language. We have examples for PHP SMS processing, ASP SMS processing and Java SMS processing.

Your web application can also return a response SMS message in the HTTP response. This response SMS messages will be forwarded back to the recipient handset. The following URL has information about the proper response format your web application can use:

HTTP response format for returning SMS response(s)

Further information

Ozeki introduced a new HTTP SMS API (v2.0) in Ozeki NG SMS Gateway v3 to address the requirements of the SMS software developer community. This new HTTP SMS API provides more features, flexibility and simplicity compared to the previous versions. It was designed to help developers be more productive and to be able to add SMS functionality to any project efficiently. To get more information about how this http sms api works, please follow the links below.

FAQs

What is an HTTP connection?

The World Wide Web thrives on a foundational protocol: Hypertext Transfer Protocol (HTTP). Operating at the application layer, HTTP facilitates seamless information exchange between web browsers and servers. This distributed and collaborative protocol excels at managing hypermedia, the cornerstone of web navigation. Without HTTP's ability to efficiently retrieve and display interconnected documents, the web browsing experience we know today wouldn't exist. In essence, HTTP is the invisible engine powering the Web.

More information