Skip to content

gidkom/twilio-phone-verification

Repository files navigation

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))

About

Phone verification using twilio's verify API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published