npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

voipnumber

v1.0.5

Published

API SDK for programmable voice and SMS/MMS on VoIP Number (voipnumber.net)

Downloads

10

Readme

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, 'text to send in SMS').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

  1. Go to the Numbers page on your VoIP Number account at app.voipnumber.net
  2. Find the Number you want to use for receiving SMS and setup SMS Webhook to your url
  3. Send SMS to your Number and receive https post request with SMS content at your url

Make sure the webhook url you will set can receive a call from public network. Our message is sent to your webhook from api.voipnumber.net in JSON format and contains Host: 'api.voipnumber.net' header that you can use for authorization check

headers: {
   'Content-Type': 'application/json',
   Host: 'api.voipnumber.net',
   'X-Forwarded-Port': '443',
   'X-Forwarded-Proto': 'https'
}

Our message to your webhook contains following data

{
   status: 'received',
   from: '+447893456836',
   to: '+447484864727',
   type: 'sms' | 'mms',
   body: 'text received in SMS',
   mdr_timestamp_s: 1716204585,
   mdr_created: '20 May 2024 11:29:45',
   mdr_id: 'da84a7b1-1a80-4e96-885e-e719d5ec909c'
}

where mdr_timestamp_s, mdr_created and mdr_id refer to the Messaging Data Record created on receipt of this SMS/MMS message. Every SMS/MMS message is reported on the Messaging Data Records page at app.voipnumber.net/messaging You will also see there if your webhook was called and what was the (HTTPs) status code returned by your infrastructure through that call