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

verifnow

v1.0.2

Published

![verifnow-sms](https://i.imgur.com/dDdvFr3.png)

Downloads

12

Readme

verifnow

verifnow-sms

A hacker-friendly interface to bypass SMS verification, using WebSockets.

  • Intended for automated systems, scripts, bots and the like that need to circumvent SMS number verification.
  • Handles hundreds of known services (google/gmail, uber, facebook, twitter, etc)
  • Typescript-powered, with an events based API

Currently supports verifnow, including their websocket API. They use bidirectional JSON-RPC 2.0, making it unique in this space (most use ancient HTTP polling). The specification for JSON-RPC 2.0 can be found here. "Bidirectional" in this context means that the server will also send notification messages to the client (as if the roles were reversed). This isn't specified in JSON-RPC 2.0 itself, but it can simply be imagined as having two JSON-RPC connections with opposite directions overlaid on the same websocket connection.

Aside from being technically interesting, this allows for nearly instant delivery of messages, and seems to lack some of the pain/bugginess you see with other services. Note that there is a two-step process:

  • Using HTTP API, request a clean number for an array of services, in a particular zip code (optional)
  • Using WebSocket API, listen for incoming SMS via the smsNotification event - note that multiple subscriptions can be active simultaneously, so for safety it is recommended to filter out any messages that you aren't interested in.

Installation

Use npm or other pm of choice.

npm i -g verifnow
export VERIFNOW_KEY='YOUR_KEY'

Usage

import { getLine, Connection } from 'verifnow'
import parse from 'parse-otp-message' // optional, makes extracting the numeric OTP a breeze

// Establish WebSocket connection to API, subscribe to incoming messages
const conn = new Connection()
await conn.subscribe()

// Fetch a line for twitter/gmail verification, in area code 805 (central coast)
const { phoneNumber } = await getLine(['GMAIL', 'TWITTER'], 93446)

// Perform your async work that triggers SMS verification

// Listen for new messages
const notif = await new Promise((resolve) => conn.on('smsNotification', (data) => data.phoneNumber === phoneNumber && resolve(data)))
const { code, service } = parse(notif.text) // extract numeric code from message

// Profit

Documentation

The snippet above demonstrates only a small part of the API. Consult the documentation here for a full list of supported methods and their signatures.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

TODO

Support for other providers (using a common interface)

Credits

Heavily inspired by sms-number-verifier <3

License

MIT