Skip to main content

achek 1.0.1 copy "achek: ^1.0.1" to clipboard
achek: ^1.0.1 copied to clipboard

Official Dart SDK for Achek — WhatsApp OTP, AI chatbots & business messaging for Nigeria.

example/example.dart

import 'package:achek/achek.dart';

Future<void> main() async {
  final client = AchekClient(apiKey: 'watp_live_your_key_here');

  // ── WhatsApp OTP ──────────────────────────────────────────
  final otpRes = await client.otp.send(
    '+2348XXXXXXXXX',
    template: 'Your login code is {{code}}. Valid for 10 minutes.',
  );
  print('OTP sent. Request ID: ${otpRes.requestId}');

  final verification = await client.otp.verify(otpRes.requestId, '847291');
  print('Valid: ${verification.valid}');

  // ── WhatsApp messaging ────────────────────────────────────
  await client.messaging.sendMessage(
    '+2348XXXXXXXXX',
    'Your order #1234 has shipped!',
  );

  // ── Telegram OTP ──────────────────────────────────────────
  final tgOtp = await client.telegram.sendOtp(
    '123456789',
    appName: 'MyApp',
  );
  print('Telegram OTP sent: ${tgOtp['otp']}');

  // ── Telegram broadcast ────────────────────────────────────
  await client.telegram.sendBroadcast(
    ['123456789', '987654321'],
    '🎉 Flash sale — 40% off everything today!',
  );
}
1
likes
150
points
72
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Dart SDK for Achek — WhatsApp OTP, AI chatbots & business messaging for Nigeria.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http

More

Packages that depend on achek