Home
RECOMMENDED FOR YOU:
SMS Gateway software
Ozeki brings you outstanding
SMS Gateway technology. Use our SMS Server products on Windows,Linux, or Android

C# SMS API
Developers can use our C# SMS API to send SMS from C#.Net. The C# SMS API comes with full source code

PHP SMS API
The ozeki PHP SMS gateway software can be used to send SMS from PHP and to receive SMS usig PHP on your website

SMPP SMS Gateway
SMS service providers use our SMPP gateway solution, that offers a high performance SMPP server and SMPP client gateway with amazing routing capabilities
Ozeki 10 SMS Gateway

How to send SMS over HTTPS API

This article demonstrates how to send sms from HTTP API. It will start with defining what HTTP API is and will continue with the explanation of how it can be used. HTTP request is a great tool to send sms, it can be used in various environments. Maybe the biggest benefit of this HTTP API solution is that all you have to do is perform some basic configuration and you will be ready to send texts in a short time. This solution uses Ozeki SMS Gateway, so you can take advantage of that fact that it allows you to manage SMS costs and to keep track of SMS traffic. We assume you have already used HTTP request and can perform basic operations with it. You will be presented with some important information and well structured step by step instructions. We hope you will find the presented instructions beneficial.

How to send SMS over HTTPS API (Step by step guidelines)

To send SMS over HTTPS API:

  1. Launch Ozeki SMS Gateway
  2. Install HTTP user
  3. Open HTTP API service Details
  4. Provide ports
  5. Write HTTP API request
  6. Copy HTTP API SMS request
  7. Send SMS over HTTP API from browser
  8. Check the Events
  9. Upload .pfx certificate file for HTTPS

How to create a new user/application (video tutorial)

Click the Install button next to HTTP user

To install a new HTTP user, you need to open the Add user or application install list. To do so, find the Apps button located on the toolbar of the Ozeki SMS Gateway (Figure 1). In the list, there is a Network users section. There, you need to find the HTTP user list item. Click the Install link to begin the installation procedure.

install http user
Figure 1 - Install HTTP user

Provide login information

In the HTTP user’s detail page, you will see a groupbox with the title of Login Information (Figure 2). Here you need to provide a username and a password for HTTP API user. Make sure to provide both and click the Ok button. To get more information about the login credentials, you can use the question mark icon located next to the Username textbox.

provide http user login information
Figure 2 - Provide HTTP user login information

Open service details

The next step is to open the details panel of the HTTP API user. Click the Advanced button on the Toolbar of the Ozeki SMS Gateway (Figure 3). It will take you to the services list. There you will see all the services that you are currently working with. Find the HTTP API service that you just created and click the Details button. It will open a page where you could modify the properties or view the events.

open http api service details
Figure 3 - Open HTTP API service details

Check the Events tab

Here in the Events tab, you can see that the Ozeki SMS Gateway successfully created the HTTP API. It started a webserver and configured it for user connection. In this log, you have the access information of the HTTP API (Figure 4). First, you will need the HTTPS port number and the IP address where the GUI is available. We provided you a copy of the event log of our example. Highlighted with red, you can see the important information about the API.

https api started on port showed in the log
Figure 4 - HTTPS API started on port showed in the log

2021-04-02 07:57:22.570 INFO http_API_1: Starting Http API(http_API_1) ...
2021-04-02 07:57:22.570 INFO http_API_1: Using configuration: https://+:9508
2021-04-02 07:57:22.570 INFO http_API_1: Starting webserver at: 'https://+:9508/'.
2021-04-02 07:57:22.570 INFO http_API_1: Starting webserver at: 'http://+:9509/'.
2021-04-02 07:57:22.570 INFO http_API_1: The GUI is available at 'https://192.168.93.6:9508/'.
2021-04-02 07:57:22.570 INFO http_API_1: The GUI is available at 'http://192.168.93.6:9509/'.
2021-04-02 07:57:22.570 INFO http_API_1: Successfully started Http API (http_API_1)

How to send the test SMS (video tutorial)

Open the service details

To configure the HTTP API to accept HTTP POST and HTTP GET requests, you need to provide the correct port numbers for the HTTPS and HTTP connection. To do so, open the advanced menu with the Advanced button located on the Toolbar (Figure 5). This will open the list of your services. Click the Details button next to the HTTP API service to open the configuration page.

open http api service details
Figure 5 - Open HTTP API service details

Change the port number

You can get the correct port number from the event log that you copied from the start of the API. The number after the HTTPS:// is the correct number for the HTTPS port textbox and the number after the HTTP:// is the correct number for the HTTP port textbox. You can find these textboxes in the Configure tab page (Figure 6).

change http api port
Figure 6 - Change HTTP API port

Write the HTTP request

The next step is to write the HTTP API request. For this part, you need basic understanding of the HTTP technology. Make sure to send the request with the password and the username you provided when you were configuring the API. On Figure 7, you can see an example HTTP code. This code will send a message to the phone number after the recipient part. It contains the username and the password for the API.

write http api request
Figure 7 - Write HTTP API request

Send the request

Paste the request to a now page of your browser. This will reach the webserver reserved for the API requests. You will get feedback about your request in a from of an xml code. On Figure 8, you can see how the XML file looks in case of an accepted message. This means that the gateway will now try to send your message. Here you can see the timestamp when the message was sent and the body of the message you sent.

send http api request from the browser
Figure 8 - Send HTTP API request from the browser

Check the sent message

In the Event tab of the Ozeki SMS Gateway, you can see that the API reached the gateway and tried to send the message. You can see here whether it was accepted or denied. To reach the Events tab, open the Ozeki SMS Gateway and search for the user that you sent the test message to. Click the Events tab and you will be presented with the logs of the user.

message sent
Figure 9 - Message sent

Upload the certificate

To have a secured HTTP, you need to upload a certificate. This will be seen by the remote party and will verify you. If you do not provide any certificate, a generated certificate will be sent. With the certificate, you will be able to use HTTPS protocol instead of HTTP. HTTPS is more secure and more stable than HTTP.

upload certificate for https
Figure 10 - Upload certificate for HTTPS

More information