bulksmszw 2.0.0-dev copy "bulksmszw: ^2.0.0-dev" to clipboard
bulksmszw: ^2.0.0-dev copied to clipboard

bulksmszw api, a port for bulksmszw-api python library. Send bulk sms using bulksmsweb services

example/main.dart

/// bulksmszw example code
/// Donald Chinhuru Dec 2020
import 'package:bulksmszw/bulksmszw.dart';

void main() async {
  print('[INFO] Sending text `hello from dart` with bulksmszw api');

  final String message = 'hello from dart';

  // contacts supports all zim numbers and groups as defined on your portal
  final List<String> contacts = ['263770000000', '2637xxxxxxxx', '#customers'];

  // create bulksmszw object
  final api = BulkSmsZw(
    bulksmsWebKey: '<your-api-key>',
    bulksmsWebName: '<your-api-username>',
  );

  // send a message, set field `credits` to true to return number of texts left in your account
  ApiResponse response = await api.send(
    message: message,
    recipients: contacts,
    credits: true,
  );

  print('[INFO] ApiResponse: ${response.toMap()}');
}
11
likes
125
pub points
0%
popularity

Publisher

unverified uploader

bulksmszw api, a port for bulksmszw-api python library. Send bulk sms using bulksmsweb services

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, http

More

Packages that depend on bulksmszw