Created
May 22, 2017 07:29
-
-
Save zengfenfei/f464bf7b54649a7ab34d7baa9c3a5760 to your computer and use it in GitHub Desktop.
This file contains 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
// Builds the url: '/account/~/extension/~/sms', and make a POST request to it | |
rc.account().extension().sms().post({ | |
to: [{ | |
phoneNumber: "{receiverPhoneNumber}" | |
}], | |
from: { | |
phoneNumber: "{yourSmsNumber}" | |
}, | |
text: "Sms content" | |
}).then(function (messageInfo) { | |
console.log("Sms sent successfully", messageInfo); | |
}).catch(function (e) { | |
console.error("Fail to send sms", e); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment