You can install this module by running the command below in your project directory:
npm install twilio
const accountSID = ''; // Obtained from the Twilio Console
const authToken = ''; // Obtained from the Twilio Console
const client = require('twilio')(accountSID, authToken);
client.messages.create({
to: '', // Number you want to send to
from: '', // From a valid Twilio number
body: 'Hello, from Stack Overflow', // What appears in the text message
})
.then((message) => console.log(message.sid));