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

authy

v1.4.0

Published

Authy.com API lib for node.js

Downloads

80,554

Readme

node-authy Dependency Status

Authy and Verify API Client for Node.js written by Adam Baldwin.

Installation

npm install authy

When in doubt check out the official Authy and Verify docs.

Usage

Requiring node-authy

var authy = require('authy')('APIKEY');

Send OneTouch

OneTouch API docs are the source of truth. send_approval_request(id,user_payload,hidden_details,logos,callback)

authy.send_approval_request('1337', user_payload, [hidden_details], [logos], function (err, res) {
    // res = {"approval_request":{"uuid":"########-####-####-####-############"},"success":true}
});
  • id is the Authy id.
  • user_payload: { 'message': 'user message here', ['details': {...}] }
  • hidden_details: optional
  • logos: optional

Check Approval Status

check_approval_status (uuid,callback)

authy.check_approval_status(uuid, function(err, res) {
    res = {
      "approval_request": {
        "_app_name": YOUR_APP_NAME,
        "_app_serial_id": APP_SERIAL_ID,
        "_authy_id": AUTHY_ID,
        "_id": INTERNAL_ID,
        "_user_email": EMAIL_ID,
        "app_id": APP_ID,
        "created_at": TIME_STAMP,
        "notified": false,
        "processed_at": null,
        "seconds_to_expire": 600,
        "status": 'pending',
        "updated_at": TIME_STAMP,
        "user_id": USER_ID,
        "uuid": UUID
      },
      "success": true
    }
});

Register New User

User API Information

register_user(email, cellphone, [country_code], [send_install_link_via_sms], callback);

authy.register_user('[email protected]', '509-555-1212', function (err, res) {
    // res = {user: {id: 1337}} where 1337 = ID given to use, store this someplace
});

If not given, country_code defaults to "1" and send_install_link_via_sms defaults to true.

Verify Token

verify(id, token, [force], callback);

authy.verify('1337', '0000000', function (err, res) {

});

Request SMS

request_sms(id, [force], callback);

authy.request_sms('1337', function (err, res) {

});

=======

request_call(id, [force], callback);

authy.request_call('1337', function (err, res) {

});

Delete Registered User

delete_user(id, callback);

authy.delete_user('1337', function (err, res) {

});

Get Registered User Status

user_status(id, callback);

authy.user_status('1337', function (err, res) {

});

Start Phone Verification

Browse the API docs for all available params.

phones().verification_start(phone_number, country_code, params, callback);

authy.phones().verification_start('111-111-1111', '1', { via: 'sms', locale: 'en', code_length: '6' }, function(err, res) {

});

The params argument is optional and sets 'sms' as the default via, leaving the other two options blank.

Check Phone Verification

Browse the API docs for all available params.

phones().verification_check(phone_number, country_code, verification_code, callback);

authy.phones().verification_check('111-111-1111', '1', '0000', function (err, res) {

});

Status of Phone Verification

Browse the API docs for all available params.

phones().verification_status(phone_number, country_code, callback);

authy.phones().verification_status('111-111-1111', '1', function (err, res) {

});
Contributors