twilio_phone_verify 0.0.2

Flutter Android iOS web

A Package that helps in verifying phone numbers and email addresses using Twilio.

Twilio_Phone_Verify #

A Package that helps in verifying phone numbers and email addresses using Twilio.

Usage #

To use this package :

  • add the dependency to your pubspec.yaml file.
dependencies:
  flutter:
    sdk: flutter
  twilio_phone_verify:

How to use #

Create a new Object

TwilioPhoneVerify _twilioPhoneVerify; 

Initialize with values

_twilioPhoneVerify = new TwilioPhoneVerify(
        accountSid: '*************************', // replace with Account SID
        authToken: 'xxxxxxxxxxxxxxxxxx',  // replace with Auth Token
        serviceSid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' // replace with Service SID
        );

Send code to phone through sms

var result = await _twilioPhoneVerify.sendSmsCode(phoneNumber);

if(result['message'] == 'success'){
  // code sent
}else{
  // error
  //print('${result['statusCode']} : ${result['message']}');
}

Verify code

var result = await _twilioPhoneVerify.verifySmsCode(phoneNumber, code);

if (result['message'] == 'approved'){
  // phone number verified
}else{
  // error
  //print('${result['statusCode']} : ${result['message']}');
}

Features #

  • [x] Phone verification
  • [ ] Email verification - Coming soon.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

2
likes
80
pub points
51%
popularity

A Package that helps in verifying phone numbers and email addresses using Twilio.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

dchiaha@gmail.com

License

BSD (LICENSE)

Dependencies

flutter, http

More

Packages that depend on twilio_phone_verify