我需要通过短信向我的应用程序用户发送通知和特殊消息。所以我要制作SMS API。如何使用node.js创建它?
您可以使用nexmo communication API;运行
npm install nexmo
用于包装
const Nexmo = require('nexmo')
const nexmo = new Nexmo({
apiKey: '*****',
apiSecret: '*****',
});
var to = 'numberTo';
var from = 'brandName';
var text = 'someText';
nexmo.message.sendSms(from, to, text);