Skip to content

Instantly share code, notes, and snippets.

@AlexLakatos
Created September 16, 2019 11:17
Show Gist options
  • Save AlexLakatos/1a1a7fe60dbab4b4b66e5b025456daee to your computer and use it in GitHub Desktop.
Save AlexLakatos/1a1a7fe60dbab4b4b66e5b025456daee to your computer and use it in GitHub Desktop.
let text = "👋Hello from Nexmo";
nexmo.message.sendSms("Nexmo", "TO_NUMBER", text, {
type: "unicode"
}, (err, responseData) => {
if (err) {
console.log(err);
} else {
if (responseData.messages[0]['status'] === "0") {
console.log("Message sent successfully.");
} else {
console.log(`Message failed with error: ${responseData.messages[0]['error-text']}`);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment