Send & Recieve SMS messages in Node.JS using Nexmo

SiDarthVader
2,043 views
undefined

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Send an SMS using Nexmo

Enter your apiKey, apiSecret, the Nexmo number, and the destination number below. Press run my code and send the SMS message.

Send an SMS
const Nexmo = require('nexmo');
const nexmo = new Nexmo({
apiKey: 'apiKey',
apiSecret: 'apiSecret'
});
nexmo.message.sendSms('VIRTUALNUMBER', 'TONUMBER', 'TEXT', (err, responseData) => {
if (err) {
console.log(err);
} else {
console.log(JSON.stringify(responseData, null, 2));
}
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content