Send & Recieve SMS messages in Node.JS using Nexmo

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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