vamshi9 / TWILIO-Text-Messages

Send text messages using twilio through node server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text-Messages

Send text messages using TWILIO Gateway through node server

##Step 1 : Copy the code into your editor

##Step 2 : Go to twilio.com and create an account and then get App ID and App Secret ,paste them in the following code

    var client = require('twilio')('App SID','App Auth Token') ;

##Step 3 : In the following code paste your twilio number

     app.get('/testtwilio',function(req,res){
       client.sendMessage({
     	      to : 'Any number',
  	        from : 'Twilio Number ',
           	body : 'let the spam be began  '  
       },function(err,data){
  	       if(err){
  	       	console.log(err);
  	       }
  	       else{
  		       console.log(data);
  	        }
        });
    });

##Step 4 : open the command prompt,set the path and type 'npm install'

##Step 5 : Now you are all set.Open command prompt and run server.js.I would suggest you NODEMON tool to run the server because it's my favourite tool!

About

Send text messages using twilio through node server

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%