twilio_phone_verify 0.0.2 copy "twilio_phone_verify: ^0.0.2" to clipboard
twilio_phone_verify: ^0.0.2 copied to clipboard

outdated

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 #

  • ✅ 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.

29
likes
30
pub points
88%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, http

More

Packages that depend on twilio_phone_verify