如何使用Node.js创建SMS API

问题描述 投票:0回答:1

我需要通过短信向我的应用程序用户发送通知和特殊消息。所以我要制作SMS API。如何使用node.js创建它?

node.js api sms message
1个回答
0
投票

您可以使用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);
© www.soinside.com 2019 - 2024. All rights reserved.