Send an SMS Using Node.js

The TextMagic SMS Node.js wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you'll then be able to send text messages.

Get it now on GitHub
Node js logo

Installation Instructions

Quick Installation

Run the following command to install the TextMagic Node.js module using npm:

npm install textmagic-rest-client

Manual Installation

You can also clone the TextMagic API wrapper for Node.JS from the GitHub repository:

git clone git://


The Node.js wrapper for the TextMagic API has the following requirements:

  • Node.js v0.12.0 or higher

Sending an SMS Using Node.js (an example)

Below is an example of how to send a text message using Node.js:

var TMClient = require('textmagic-rest-client');
var c = new TMClient('username', 'C7XDKZOQZo6HvhJwtUw0MBcslfqwtp4');
c.Messages.send({text: 'test message', phones:'9990001'}, function(err, res){
    console.log('Messages.send()', err, res);


If you need help with the wrapper, or if you have any suggestions for improvements and/or if you have any enquiries regarding the Node.js SMS gateway, please contact us by emailing [email protected].