Created
September 16, 2019 11:17
-
-
Save AlexLakatos/1a1a7fe60dbab4b4b66e5b025456daee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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