baxcloud_verify_sdk 1.0.0 copy "baxcloud_verify_sdk: ^1.0.0" to clipboard
baxcloud_verify_sdk: ^1.0.0 copied to clipboard

BaxCloud Verify SDK for Flutter — SMS OTP verification via BaxVerify

BaxCloud Verify SDK for Flutter #

SMS OTP verification for iOS and Android apps via BaxVerify.

Installation #

dependencies:
  baxcloud_verify_sdk: ^1.0.0
flutter pub get

Quick Start #

import 'package:baxcloud_verify_sdk/baxcloud_verify_sdk.dart';

final verify = BaxCloudVerifyClient(
  config: BaxCloudVerifyConfig(
    projectId: 'your-project-id',
    apiKey: 'your-baxverify-api-key',
    debug: true,
  ),
);

// Send OTP
final sent = await verify.sendOtp(
  SendOtpOptions(phone: '+14155552671', purpose: BaxVerifyOtpPurpose.login),
);
print('Code expires in ${sent.expiresInSeconds}s');

// Verify OTP
final result = await verify.verifyOtp(
  VerifyOtpOptions(phone: '+14155552671', code: '123456'),
);
print('Verified: ${result.verified}');

Prerequisites #

  1. Enable BaxVerify on your BaxCloud project (Dashboard → Project → BaxVerify).
  2. Create an API key with the BaxVerify scope enabled.
  3. Complete BaxVerify setup: rent a phone number and/or register a Sender ID.

API Reference #

Method Description
sendOtp(SendOtpOptions) Send SMS verification code
verifyOtp(VerifyOtpOptions) Verify a code
getStats({days}) Usage stats (sent, verified, failed)
listLogs({phone, status, page}) Paginated delivery logs

Authentication #

All requests use:

Authorization: Bearer <api_key>
X-Project-Id: <project_id>

Base URL: https://api.baxcloud.tech/v1

Error Handling #

try {
  await verify.verifyOtp(VerifyOtpOptions(phone: '+14155552671', code: '000000'));
} on BaxVerifyException catch (e) {
  print('${e.statusCode}: ${e.message}');
}

Documentation #

License #

See LICENSE.

0
likes
0
points
141
downloads

Publisher

unverified uploader

Weekly Downloads

BaxCloud Verify SDK for Flutter — SMS OTP verification via BaxVerify

Homepage

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on baxcloud_verify_sdk