Skip to content

Instantly share code, notes, and snippets.

@enricop89
Created May 29, 2019 08:46
Show Gist options
  • Save enricop89/e24ee0ebda65ba56d74d2cc3ebdb88b6 to your computer and use it in GitHub Desktop.
Save enricop89/e24ee0ebda65ba56d74d2cc3ebdb88b6 to your computer and use it in GitHub Desktop.
Nexmo SMS Set DLR Webhook
const Nexmo = require( 'nexmo' );
const apiKey = "yourApiKey";
const apiSecret = "yourApiSecret";
const nexmo = new Nexmo( {
apiKey,
apiSecret,
} );
nexmo.message.sendSms('Nexmo test','440000000', 'Your message', {callback: 'https://enrico.com/status/adjni3'},
function (err, res ){
if ( err ) {
console.log( '[sendSMS] - err', err );
reject( err );
}
console.log('res', res)
},
{ useBasicAuth: true },
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment