Inspiration

I use Nexmo a LOT, especially at work. Sometimes, we have nightly jobs that send reminders to our opt-in users. Because of the telecom SMS policies, from one sender Nexmo number, you can only send 1 SMS per second. I sought to solve that in the easiest way possible.

What it does

NexmoLiberator is a DROP-IN replacement for Nexmo's Send SMS API. Just change the domain and that's it! You can blast away at the Send API and NexmoLiberator takes care of waiting 1 second between messages. It will even track the waiting time between all sending numbers so that it will wait the least amount of time possible. This will speed up throughput if you use multiple numbers to blast.

How I built it

I built the same REST api as Nexmo but with the messages queued in a RabbitMQ queue that intelligently ensures 1 second between each SMS Send as needed per sending number. NexmoLiberator itself calls the Nexmo Send API at the right time.

Challenges I ran into

Setting up RabbitMQ was a pain. Requires proper linux bash startup scripts and restarting of PHP scripts.

Accomplishments that I'm proud of

It works very well! Seamlessly.

What I learned

Message Queues are awesome!

What's next for NexmoLiberator

Provide a webhook to receive the SMS send status. Hopefully Nexmo will provide this Queueing functionality built in to the Nexmo Send API soon.

Built With

Share this project:

Updates