Tharindu Lakshan
Tharindu Lakshan

Reputation: 6116

How to Create SMS API using Node.js

I need to send notifications and special messages to my app users as an SMS. so I want to make SMS API. how can I create it using node.js?

Upvotes: 1

Views: 895

Answers (1)

Joshua Oweipadei
Joshua Oweipadei

Reputation: 167

You can use the nexmo communication API; Run

npm install nexmo

for the 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);

Upvotes: 3

Related Questions