1.0.4 • Published 1 month ago
voipnumber v1.0.4
Install
npm i voipnumber
Send SMS
Send SMS from your Number to any other number:
const voipnumber = require('voipnumber')('accountId','apiToken');
const from = '+447893456836';
const to = '+447484864727';
voipnumber.sms.send(from, to, 'Hello world').then((res) => {
console.log(res);
}).catch((err) => {
console.log(err);
});
First number (from
) must belong to your account and must have SMS capabilities.
You will find your accountId
and apiToken
on the Settings page at app.voipnumber.net
Receive SMS
- Go to the Numbers page on your VoIP Number account at
app.voipnumber.net
- Find the Number you want to use for receiving SMS and setup SMS Webhook to your url
- Send SMS to your Number and receive https post request with SMS content at your url