Messente avatar logo

Top 5 Most Common Mistakes When Implementing SMS Messaging API

- 5 MIN READ - 20 Oct 2013

Implementing SMS messaging to your existing web app is always a hassle and takes some time to get everything right.

Spending days on implementing some appearantly simple API is not very interesting and this usually results in extra coffee break for the developer instead of adding one more "if-then-else" to the code.

Messente for example has multiple Helper Libraries for most popular programming languages that do the heavy-lifting for you to avoid some common mistakes but you should not overlook most common practices.

1. Check the Response Code and Act Accordingly

Usually developers check if the SMS was successfully sent to the service provider and if there is an error, the app tries to send the text again or just skips it.

When an error code is returned there should be at least two different processes implemented:

In either case, server administrator should be notified that an error occurred and someone should look into it, which lead us to the next point.

2. No Notification System in Case of an Error

When error code is returned for the message sending request, there could be dosens of reasons why it failed.

In every case, server administrator should be somehow notified that something unexpected happened with the SMS messaging service.

Having internal notification system will help you avoid most common causes like for example when the account runs out of credits.

3. Your IP Address has Changed

Messente has implemented IP-based filters for API calls to block requests from unwanted servers.

When possible, get your server a static IP address. You can also add a list multiple IP addresses in the API settings to allow requests to be made from multiple servers.

4. Incorrect Encoding of the Message Body

The most commonly used character encoding in the web is UTF-8, that supports all the characters from all alphabeths. This is also what Messente assumes you are using.

When testing out the API and everything seems to be working with simple “abc”, you might run into trouble when suddenly you need to send text with “ñ” character in it.

If you are using some other encoding like Western (ISO-8859-1) or Cryllic (KOI8-R), first convert the text to UTF-8.

Or when that is not possible, just let Messente know what encoding you will be using and it will take care of it.

5. Backup Route is Not Implemented

You are still able to send SMS messages even when the main server is having hickups by simply switching to a backup server.

It happens rarely that Messente’s main server is down, but when nature is having a bad day, nobody is safe.

What’s Next?

Stay tuned for next versions of API helper libraries by following us on Twitter or Facebook.

Jaanus Rõõmus

Jaanus Rõõmus - CTO

Jaanus is co-founder and CTO of Messente and makes sure its wheels keep spinning and Messente always has a full tank of fuel.

Have you met 1oT? Mobile data connectivity for IoT companies.

24 Apr 2018

Last week, Lauri wrote a good piece about keeping things real, because businesses have simple business models at their core. As one of our values, simplicity has led Messente to build a reliable and powerful SMS API and user authentication API for businesses and brands to communicate with their customers globally.

While we pride ourselves in doing global A2P SMS and 2FA very well, one of our sister companies, 1oT, uses a similar methodology of simplicity to do global internet of things (IoT) and machine-to-machine (M2M) connectivity really well.

Yuriy Mikitchenko

Yuriy Mikitchenko

A note on keeping things real

17 Apr 2018

Over the years, I've had the good fortune of talking to and doing business with many entrepreneurs and CEOs from a variety of industries. Some are first-time founders of small startups, while others are amazingly experienced serial entrepreneurs. Many of them are extremely successful in what they do.

So naturally, while listening to them talk about their businesses, I've always tried to spot any fundamental takeaways –the small drops of universal business advice distilled from those hundreds of conversations.

And it seems to me that a lot of the most profound business truths seem to point to a direction that I would call, "keeping it real.”

Lauri Kinkar

Lauri Kinkar

Next-generation Omnichannel API is well underway

10 Apr 2018

Over the last few months we’ve been setting the direction of our Omnichannel messaging API and our development team has started working on it. Considering transparency, we wanted to share the progress we’ve made on the API and give our clients something to look forward to, as well as helping clients prepare their systems for the next generation of our A2P messaging API.

Uku Loskit

Uku Loskit

Start sending messages to

for € N/A

Contact us