How to Send SMS With Node JS

Welcome to our iSMS Malaysia Team's comprehensive guide on adding SMS functionality to your website using Node.js! In this guide, we'll walk you through the process of sending SMS messages using HTTP communication between your website and the SMS Gateway. With our SMS API, you can easily send and receive SMS messages and enhance the communication experience for your users.

To understand more about our iSMS API Key features, please visit our Developer API page.


All available features and configurations will be displayed at the iSMS Developer API page. Integrate our SMS API into your NodeJS application and enjoy our SMS services.


1. Firstly, register a username and password from iSMS Register Page.


It only requires a few information from you such as username, password and your mobile number. It is free.


After you have register an account, you will need to purchase some credit from iSMS Reload Page, you will receive an email containing the reload PIN if you purchase for the first time.


However, if you purchase more than once, the account is automatically credited. Login to iSMS website and insert the PIN.



2. Now you are ready.


To use our API, you'll need to create a file on your hosting server called api_post.js. Before you begin, ensure that you have installed Node.js. Once you've done that, simply copy and paste the code provided below into the file.

const https = require('https');
const querystring = require('querystring');

const postData = querystring.stringify({
  'un': 'yourloginname',
  'pwd': 'yourpassword',
  'dstno': '60164502380',
  'msg': 'your message',
  'type': '1',
  'agreedterm': 'YES',
  'sendid': '63001'
});

const options = {
  hostname: 'www.isms.com.my',
  path: '/isms_send_all_id.php',
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': Buffer.byteLength(postData)
  }
};

const req = https.request(options, (res) => {
  console.log(`statusCode: `);

  res.on('data', (d) => {
    process.stdout.write(d);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(postData);
req.end();



Contact Us

Please contact us HERE, if you have any enquiries or looking for any consultation.

Email: sales@mobiweb.com.my

Note to registered users: Please include your Username in the email.

Phone Numbers:

  • 1800 87 7061 (Malaysia Toll Free)
  • +604 642 0621 (Penang, Malaysia)
  • +603 2780 3880 (Line 1 Kuala Lumpur, Malaysia)
  • +603 7980 1388 (Line 2 Kuala Lumpur, Malaysia)

Fax:

  • +604 611 5620 (Penang, Malaysia)
  • +603 7980 2388 (Kuala Lumpur, Malaysia)

Articles

 

SMS Coverage for All Countries Worldwide

A B C D E F G H I J K L M N O P Q R S T U V Y Z
divider