SMS is a common method of sending short messages between cell phones, but these SMS can be sent to multiple users at a time using Twilio notify service. Sending bulk SMS to users at a time is possible using Twilio.
- It’s easy to get started and easy to use.
- It is widely used for sending bulk SMS.
- User can send SMS to desired mobile numbers fastly and efficiently.
Installation of Twilio module:
- You can visit the link to Install twilio module. You can install this package by using the following command.
npm install twilio
- After installing twilio you can check your twilio version in command prompt using the command.
npm version twilio
- After that, you can create a folder and add a file. For example
index.js. To run this file you need to run the following command.
- Requiring module: You need to include twilio module in your file by using these lines.
const client = require('twilio')(YOUR_ACCOUNT_SID, YOUR_AUTH_TOKEN);
- Go to Twilio official website and create your account. After login, go to your dashboard and you can get your auth_token and account_sid.
- Now go to console/notify/services and create your own notify service.
- Now select a message service sid, if is it not showing then you have to create a message service sid and add a phone number to it and then you can see that message service sid in the drop-down as shown below.
- Copy your service_sid and click the save button.
- The project structure will look like this:
- Make sure you have installed twilio using the following commands:
npm install twilio
- Run index.js file using following command:
- SMS send successfully to all numbers passed as parameter.
- Sending bulk emails in Node.js using SendGrid API
- Nodejs | Automatic restart NodeJs server with nodemon
- How to get daily weather notification on mobile using Node.js and Twilio API ?
- Sending SMS using NEXMO API in Node.js
- Sending Emails Using API in Flask-Mail
- PHP | Sending mails using mail() function
- Sending Push Notifications : Progressive Web Apps
- Nodejs | DNS
- Web-Socket in NodeJS
- Nodejs | Jimp
- Nodejs | DNS | setServers()
- Nodejs | GM whitePoint() Function
- Nodejs | GM edge() Function
- Nodejs | GM implode() Function
- Nodejs | GM chop() Function
- Nodejs | GM channel() Function
- Nodejs | GM flop() Function
- Nodejs | GM monochrome() Function
- Nodejs | GM whiteThreshold() Function
- Nodejs | GM modulate() Function
Steps to get your YOUR_ACCOUNT_SID, YOUR_AUTH_TOKEN and YOUR_SERVICE_SID:
Steps to run the program:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.