SMS Gateway reliability

SMS Gateway reliability

It’s been more than two months since the launch of SMS Gateway ( free ) app. It is very stable and now you can test its stability and reliability.

Two-factor authentication ( 2FA )

To test it all you need to do is to register an account and enable two-factor authentication ( 2FA ). All SMS one-time password ( OTP ) is sent from my SMS Gateway ( free ) app.

sms gateway reliability
Two-factor authentication enabled for my account.

Duration

You should be receiving SMS OTP somewhere between 2-7 seconds assuming the cellphone network takes 1-2 seconds to send.

My Settings

There are two settings that you can configure on your app.

  • Refresh rate. The interval the app polls the server to check for new messages to send. My setting= 5 seconds.
  • Delay between send. The delay in milliseconds between two SMS sent. My setting= 100 milliseconds.

 

Exporting Google Contacts

Exporting Google Contacts

Exporting Google contacts by going to https://contacts.google.com and log in using your Gmail credentials. Once logged in, you will see a similar screen like the screenshot below.

Export

To export Google Contacts CSV, expand the “More” on the left navigation menu and click “Export”. Make sure that “Google CSV” is the chosen format and click “EXPORT”.

exporting google contacts
Steps showing how to export Google Contacts CSV

 

SMS Gateway launched

SMS Gateway launched

SMS Gateway was launched somewhere around mid-August 2018 with a basic API to send and receive SMS through an Android phone.

Bug fixes & stability

In the beginning, right after launch, the app could not stay running for 3 hours straight. It was terrible and after days of debugging, now it stays on for days without crashing.

Easy sign-up

I added a sign-up button within the app for easy sign up with one click. It will open your Chrome browser and navigate directly to the sign-up page. You do not need to copy and paste the sign-up URL into your Chrome browser manually.

Known issues

The app is currently polling and checking for messages to send every few seconds depending on the refresh interval settings of 5, 10, 15, 20, 30, 60 seconds. For this to happen, the screen needs to be on and unlocked.

Usage suggestions

Use an old Android phone of yours with a secondary SIM card/phone number and turn it into an SMS gateway. Best to enable do not disturb mode, enabling it will block incoming calls and disable incoming SMS vibration. Also dim the screen brightness all the way down since you’ll be leaving the screen on all the time.

Hurdles

Bulk SMS with personalized first/last name substitution in SMS template is ready but I’m currently stuck at getting the SMS Gateway ( free ) app approved by Google Play Store screening.

Apparently these days Google is very strict about apps requesting multiple permissions. Bittersweet moments, happy that it is safer now, frustrated that it is so difficult for me to publish a new functionality.

SMS Gateway documentation

SMS Gateway documentation

Queue message in the outbox. For more information, read my SMS Gateway queue message blog post.

URL = https://sgw.oofnivek.com/message/queue
HTTP type = POST
Parameters = user, token, destination, message

Check received messages in the inbox. For more information, read my SMS Gateway check inbox blog post.

URL = https://sgw.oofnivek.com/inbox/check
HTTP type = POST
Parameters = user, token

SMS Gateway check inbox

SMS Gateway check inbox

To check the SMS you received while SMS Gateway Android app is running. Just make a POST HTTP call to SMS Gateway with your user and token using curl or wget in MacOS or Linux. You can use PowerShell in Windows 10 or use Postman if you prefer a graphical user interface (GUI).

Curl

My preferred method for HTTP POST in MacOS or Ubuntu. It is not preinstalled in Ubuntu desktop, you will need to install it with the following command.

sudo apt-get install curl

To check your SMS received using curl. Type in the following command.

curl -s \
--form-string "user=yga6pCt1h83knBnAqDfpunkCsno62b4EH11x" \
--form-string "token=GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF" \
https://sgw.oofnivek.com/inbox/check

Wget

If you prefer wget over curl, type in the following command. The -q is for quiet so that you don’t get all the verbose message output from the wget command. The -O – (is an uppercase O just in case you confuse it with zero) is to output it to screen instead of saving it to file.

wget -q -O - --post-data "user=yga6pCt1h83knBnAqDfpunkCsno62b4EH11x&token=GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF" https://sgw.oofnivek.com/inbox/check

PowerShell

If you are running Windows 10, you can run PowerShell, type in the following command to check the SMS received. I have not tested it with the PowerShell in other Windows version other than Windows 10.

[email protected]{user='yga6pCt1h83knBnAqDfpunkCsno62b4EH11x';token='GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF'}
Invoke-WebRequest -Uri https://sgw.oofnivek.com/inbox/check -Method POST -Body $body

Postman

With Postman, just fill in all the required fields, choose the HTTP message type and hit the [Send] button. Required fields are URL, user and token. The HTTP type will be POST. Click the [Send] button. You can see the JSON output nicely formatted when you on the [Pretty] button as shown below.

sms gateway check inbox
Successful HTTP POST message to check SMS received from SMS Gateway.

SMS Gateway queue message

SMS Gateway queue message

If you are running MacOS or Linux you can simply just use curl or wget to queue a message into SMS Gateway so that your Android phone can pick it up and send. If you are running Windows then you can use PowerShell or if you are a GUI person then install Postman.

Curl

In MacOS curl is already preinstalled therefore you can immediately use it once you open up your terminal. As for Ubuntu desktop, you will need to install curl by typing

sudo apt-get install curl

Once installed you can type the following curl command to send a POST HTTP message to SMS Gateway to queue your SMS message. The user and token below are dummy values, please replace it with your own user and token.

curl -s \
--form-string "user=yga6pCt1h83knBnAqDfpunkCsno62b4EH11x" \
--form-string "token=GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF" \
--form-string "destination=+6587654321" \
--form-string "message=hello world" \ https://sgw.oofnivek.com/message/queue

Wget

If you prefer to use wget over curl, you can type the command below to send a POST HTTP message. I’ve added the parameter -q for quiet so that I don’t see all the verbose message from wget. Besides that I also added the -O – (it is an uppercase O, just in case you can’t differentiate it with zero) parameter so that the result of the HTTP POST call will be output to the screen instead of saving into a file.

wget -q -O - --post-data "user=yga6pCt1h83knBnAqDfpunkCsno62b4EH11x&token=GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF&destination=+6587654321&message=hello world" https://sgw.oofnivek.com/message/queue

PowerShell

For PowerShell, I’m breaking the commands into two lines. First for the post params and values. Second to send to POST HTTP message.

[email protected]{user='yga6pCt1h83knBnAqDfpunkCsno62b4EH11x';token='GsiLTcNvgkVJWF9hLgYwwMiY1iE5W8pr4TyF';destination='+6587654321';message='hello world'}
Invoke-WebRequest -Uri https://sgw.oofnivek.com/message/queue -Method POST -Body $body

Postman

Postman provides a nice graphical user interface (GUI) for you to enter all the parameter’s name and value. Select the POST HTTP type and the URL you are posting the message to. Once all the field are filled up just hit the [Send] button.

sms gateway queue message
A successful HTTP POST message to SMS Gateway.