Send SMS Text Messages From Node.js (Routemobile)

In this tutorial, we’ll show you how to use Routemobile’s Programmable SMS to send SMS from your Node.js application.


Sign up for (or log in to) your Routemobile’s account. (

After that make one file sms.js. Put the following code to it.

var http = require('http');
let test_message = "My test sms.";
let username = "xxxxxxxxxx";
let password = "xxxxxxxxxx";
let phone_number = "900xxxxxxx";
let sender_id = "xxxxxxxx";
let url = ''+username+'&password='+password+'&type=0&dlr=1&destination='+phone_number+'&source='+sender_id+'&message='+test_message;

http.get(url, function (result) {
console.log('send sms Success, with: ' + result.statusCode);
}).on('error', function (err) {
console.log('send sms Error, with: ' + err.message);

Go to terminal and run

node sms

Developer by profession . Youtube channel :