Whatsapp plugin
Whatsapp data importer for Memri using Whatsapp Multi-Device Websocket
Install
pip install -e .
Run
To run anything, make sure to have a pod running.
run_plugin --metadata "metadata.json"
Go to localhost:8000/qr
, and scan the QR code
Run in docker
With a pod running, run:
docker build -t whatsapp .
then:
simulate_run_plugin_from_frontend --metadata "metadata.json"
Go to localhost:8000/qr
, and scan the QR code (with a time limit of 20 seconds)
Sending messages
To send a whatsapp message (with a running and authenticated plugin), you can define a json file with the following structure:
{
"service": "whatsapp",
"phone_number": "<target_number>",
"content": "This is a test message"
}
This message can be sent with:
send_message_action --config="example_message.json"
Classes imported
- Account
- photo
- displayName
- MessageChannel
- name
- Message
- sender
- content
- receiver
- messageChannel
Contributing
See contributing
Legal
This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.