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

getsmscode2

v1.0.10

Published

API client for getsmscode.com

Downloads

23

Readme

getsmscode

API client for getsmscode.com.

NPM Build Status JavaScript Style Guide

  • provides temporary, physical mobile numbers (not virtual VOIP numbers!)
  • meant for automated systems that need to bypass SMS number verification
  • handles hundreds of known services (wechat, google, facebook, whatsapp, uber, twitter, etc...)

Install

This module requires node >= 8.

npm install --save getsmscode2

You'll need to setup a getsmscode.com account and add some money to your account before using this module.

Usage

const GetSMSCodeClient = require('getsmscode2')

const client = new GetSMSCodeClient({
  username: '...',
  token: '...'
})

const number = await client.getNumber({
  service: 'google'
})

// give this number to third-party service such as google...
// third-party service sends SMS code to the given number...

const sms = await client.getSMS({
  service: 'google',
  number: number
})

Note: there may be variable amounts of latency between giving your number to the service and the SMS code being received. If no valid messages are returned, it is recommended that you retry client.getSMS with an exponential timeout. Be careful not to call the API too fast, however, as getsmscode imposes strict rate limits.

API

GetSMSCodeClient

Type: function (opts)

  • opts object? Config options
    • opts.username string Username for getsmscode auth (optional, default process.env.GETSMSCODE_USERNAME)
    • opts.token string Token for getsmscode auth (optional, default process.env.GETSMSCODE_TOKEN)
    • opts.domain string Domain for this client to use (china/usa/asia/br) (optional, default 'china')

login

Logs in to test auth and fetches an account summary.

Type: function (): Promise


getNumber

Acquires a temporary handle on a mobile number usable for the given service.

You must specify either opts.service or opts.pid.

Type: function (opts): Promise

  • opts object Config options
    • opts.service string? Name of service to get number
    • opts.pid string? Project ID of service to get number
    • opts.mobile string? if need to use number again
    • opts.cocode string? Country code (required if using asian domain)

getNumbers

Returns a list of { number, service } objects currently in use by this account.

Type: function (): Promise


releaseNumber

Release a number { number } currently in use by this account.

Type: function (): Promise


getSMS

You must specify either opts.service or opts.pid.

Type: function (opts): Promise

  • opts object Config options
    • opts.number string Mobile number to get SMS
    • opts.service string? Name of service to get SMS
    • opts.pid string? Project ID of service to get SMS
    • opts.cocode string? Country code (required if using asian domain)
    • opts.author string? Author email

addNumberToBlacklist

Adds a number to this account's blacklist for the given service.

You must specify either opts.service or opts.pid.

Type: function (opts): Promise

  • opts object Config options
    • opts.number string Mobile number to blacklist
    • opts.service string? Name of service to blacklist number
    • opts.pid string? Project ID of service to blacklist number
    • opts.cocode string? Country code (required if using asian domain)

Related

Disclaimer

Using this software to violate the terms and conditions of any third-party service is strictly against the intent of this software. By using this software, you are acknowledging this fact and absolving the author or any potential liability or wrongdoing it may cause. This software is meant for testing and experimental purposes only, so please act responsibly.

License

MIT © Travis Fischer

Support my OSS work by following me on twitter