Need private packages and team management tools?Check out npm Teams »

twilio-phone-verification

1.0.1 • Public • Published

Twilio Phone Verification

Build Status

A NodeJS library to verify phone numbers using twilio's verification API

 

Installation

yarn add twilio-phone-verification

OR

npm install --save twilio-phone-verification

Usage

import { Verification } from  'twilio-phone-verification';

const verify = new Verification(process.env.API_KEY);

// send verification code
verify.sendVerification(phoneNumber, countryCode, codeLength)
.then(res => console.log(res))
.catch(err => console.log(err))


// confirm verification code

verify.checkVerification(code, phoneNumber, countryCode)
.then(res => console.log(res))
.catch(err => console.log(err))

Install

npm i twilio-phone-verification

DownloadsWeekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

8.02 kB

Total Files

12

Last publish

Collaborators

  • avatar