パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.2.0

whatsapp_sender_flutter

WhatsApp Sender Flutter は、Flutter向けの公式ではないAPIで、WhatsAppに一括メッセージを送信できます

macOSWindowsLinux
30日間ダウンロード
45
いいね数
31
Pub ポイント
125

パッケージをインストール

flutter pub add whatsapp_sender_flutter

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

WhatsApp Sender Flutter は、開発者がプログラム的に一括した WhatsApp メッセージを送信できる非公式の Flutter パッケージです。ブラウザの自動化を通じて WhatsApp Web API と統合され、公式の WhatsApp API アクセスなしでメッセージ配信が可能です。macOS、Windows、Linux などのデスクトッププラットフォーム向けに設計されており、自動通知、リマインダー、マーケティングキャンペーンなどに役立ちます。パッケージのセットアップには手動での設定が必要であり、有効な WhatsApp Web セッションに依存します。機能的には問題ありませんが、公式の WhatsAppガイドラインとは異なる運用となるため、アカウント停止のリスクがあります。

用途

  • 一括通知システム
  • 自動リマインダー
  • マーケティングキャンペーンツール
  • カスタマーアウトリーチ
  • イベント招待

主な機能

  • 一括メッセージ送信
  • デスクトッププラットフォームのサポート
  • ブラウザ自動化バックエンド
  • Flutter とのシンプルな統合
  • セッションの永続性

適している対象

  • デスクトップアプリを開発する開発者
  • 大量メッセージングが必要なチーム
  • 非営利のオートメーションプロジェクト
  • WhatsApp インテグレーションのプロトタイピング

注意事項

  • 非公式APIの使用
  • アカウントのバンリスク
  • 手動でのセッション設定が必要です
  • デスクトッププラットフォームに限定
  • 公式のWhatsAppサポートなし

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

WhatsApp Sender Flutter

pub package pub points pub popularity pub likes

WhatsApp Sender Flutter is an unofficial API for Flutter to send bulk messages in Whatsapp. It's not recommended using it in your company or for marketing purpose.

Buy Me A Book

Thanks to rohitsangwan01 for reference!

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  whatsapp_sender_flutter: latest

Import it:

import 'package:whatsapp_sender_flutter/whatsapp_sender_flutter.dart';

Configuration

For the first usage, wait for the automatic download of the .local-chromium folder in your project root. Without this folder the package will not work,this is because this package is based on puppeteer.

Basic usage

The process for sending messages is like for WhatsApp Web:

  1. Scan the qr code
  2. Start the sending
Send text message

After you have scanned the code, you can start the sending campaign.

All phones must contain the international prefix!

   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
   );
Send file message

After you have scanned the code, you can start the sending campaign.

All phones must contain the international prefix!

   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
         file: File("path-to-file.pdf"),
   );
Listen changes

New functions for listen changes:

  1. onEvent(WhatsAppSenderFlutterStatus status), usethis function to listen the sending status
  2. onQrCode(String qrCode), use this function to intercept the qrCode
  3. onSending(WhatsAppSenderFlutterCounter counter), use this function to count the number of successful or unsuccessful submissions.
  4. onError(WhatsAppSenderFlutterErrorMessage errorMessage), use this feature to catch errors while sending
   await WhatsAppSenderFlutter.send(
        phones: [ "391111111", "391111111", "391111111"],
        message: "Hello",
        file: File("path-to-file.pdf"),
        onEvent: (WhatsAppSenderFlutterStatus status) {
          print(status);
        },
        onQrCode: (String qrCode) {
          print(qrCode);
        },
        onSending: (WhatsAppSenderFlutterCounter counter) {
          print(counter.success.toString());
          print(counter.fails.toString());
        },
        onError: (WhatsAppSenderFlutterErrorMessage errorMessage) {
          print(errorMessage);
        },
   );

To know in detail the possible states of WhatsAppSenderFlutterStatus, WhatsAppSenderFlutterCounter, WhatsAppSenderFlutterErrorMessage read documentation

Save your session
   await WhatsAppSenderFlutter.send(
         phones: [ "391111111", "391111111", "391111111"],
         message: "Hello",
         savedSessionDir: "./userData"
   );

To save the session you must indicate a folder name in savedSessionDir.

If you save the session you will no longer have to scan the qr code !

Do not indicate savedSessionDir if you want to be asked to scan the qr code at each sending.

To Do

  • Send text message ✔️
  • Multi session support ✔️
  • Send files ✔️
  • Native mobile support (Android, IOS)

License

MIT

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。