[英]How to Create SMS API using Node.js
I need to send notifications and special messages to my app users as an SMS.我需要以 SMS 的形式向我的应用用户发送通知和特殊消息。 so I want to make SMS API .
所以我想做短信 API 。 how can I create it using node.js?
如何使用 node.js 创建它?
You can use the nexmo communication API ;可以使用nexmo通讯 API ; Run
跑
npm install nexmo
npm 安装nexmo
for the package用于 package
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);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.