A NodeJS library to verify phone numbers using twilio's verification API
yarn add twilio-phone-verification
OR
npm install --save twilio-phone-verification
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))