Back
Close

Send & Recieve SMS messages in Node.JS using Nexmo

SiDarthVader
2,087 views

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
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants