Skip to content

Instantly share code, notes, and snippets.

@zengfenfei
Created May 22, 2017 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zengfenfei/f464bf7b54649a7ab34d7baa9c3a5760 to your computer and use it in GitHub Desktop.
Save zengfenfei/f464bf7b54649a7ab34d7baa9c3a5760 to your computer and use it in GitHub Desktop.
// 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