How to authenticate SMPP users with HTTP
With a HTTP Authentication Provider, you can give your userbase login rights to Ozeki SMS Gateway. During the installation process you will be asked to provide details for the user's account. These details contain the username and password which you will need to use for your first login. You will also need a HTTP webserver which will approve the user credentials during the HTTP authentication. In this tutorial you will see example PHP codes for your webserver.
Step 1 - Create new HTTP Authentication Provider
The first step is to open the Control Panel application in Ozeki SMS Gateway. So, just navigate to the desktop of Ozeki SMS Gateway, and here, as you can see it in Figure 1, just open Control Panel by clicking on its icon.
Now you should be on the Control Panel main page where you can create, modify or delete connections. Click on the Users button and you will find yourself on the User accounts menu (Figure 2).
You will find yourself on the list of authentication providers. On the Authentication provider page you can create, modify or delete authentication providers. Create a new authentication provider by clicking the blue Create new authentication provider button. A new box will open on the right side of the page. In this box you can select between authentication providers. Please choose HTTP authentication provider as the Figure 3 and Figure 4 shows.
Please fill the HTTP Authentication Provider form (Figure 5) depending on your HTTP server IP and PHP file name. It is essential to set OZEKILOGINHASH as a HTTP parameter. You also need to provide the correct HTTP response Ozeki SMS Gateway should wait for.
The example HTTP request set for Ozeki SMS Gateway logins:
http://192.168.0.113/HTTP_response.php?remotelogin=${OZEKILOGINHASH}
The example HTTP response Ozeki SMS Gateway is waiting for:
Login accepted
It is time to write your PHP script and fill out the HTTP authentication form in Ozeki SMS Gateway. If you are experimenting on the field, we advise to install an Apache which is a HTTP server. Please make sure that port 80 is free for your HTTP server. We have named the example file 'HTTP_response.php'.
Here you can see the PHP example code:
<?php $remotelogin = ''; //the HTTP parameter of the OZEKILOGINHASH $array = array( "Ozeki" => "462ac6d8aadf8b8f909d859c4aa696fa", //passw 12345 "smppuser" => "296adaf6fd0612bfefacd1055f03c31c" //passw qwe123 ); if(isset($_REQUEST['remotelogin'])) $remotelogin = $_REQUEST['remotelogin']; if($remotelogin == $array["Ozeki"] || $remotelogin == $array["smppuser"]) echo 'Login accepted'; else echo 'Login refused'; ?>
OZEKILOGINHASH contains an encrypted username and password pair. Comparing the OZEKILOGINHASH with your OZEKILOGINHASH-ed user list can help authenticate logins.
Step 2 - Create SMPP Service with HTTP Authentication
The next step is to open the SMS Gateway application. So, just navigate to the desktop of, and here just open SMS Gateway by clicking on its icon. Here you can find the Advanced menu of the SMS Gateway. To open it please click the "Advanced" button on the main page. (Figure 6)
On the Advanced page you can create, modify or delete SMS Services. Create a new SMS Services by clicking the blue Create new Service button. A new box will open on the right side of the page. In this box you can select between SMS Services as you can see in the Figure 7. And then please choose SMPP Service (Figure 8).
A form will be available in the box. You should fill out the form to configure the SMPP Service. Please provide a unique name and a port for this service as you can see it in Figure 9.
Then on the Advanced tab of the SMPP Service set the HTTP authentication provider in the User Authentication section as the Figure 10 shows.
Finally, if an SMPP Client is connecting with the username and password you created in the database, you will see that the User is appear in the SMS Gateway Users and applications section (Figure 11).
More information
- How to authenticate SMPP server users using a database
- How to authenticate SMPP server users using LDAP
- How to authenticate SMPP server users using HTTP requests