tungsten-whatsapp
WhatsApp for Tungsten leads (needs tungsten-leads).
Three ways to send
| Way | Setup | What you get |
|---|---|---|
| Links only | None | The WhatsApp button on a lead opens WhatsApp (app or web) with the chat ready. |
| Cloud API (official) | A Meta app with WhatsApp | Send texts and approved templates from the panel, get replies, delivered and read ticks. |
| WhatsApp Web (linked phone) | A WAHA gateway | Send from your own WhatsApp number, linked by QR code. Get replies. |
Everything sent and received shows on the lead's timeline and in WhatsApp chats. New chats can become leads by themselves, and new leads can get a welcome message (for example only leads from Facebook).
Install
pip install tungsten-whatsapp
from tungsten_leads import LeadsPlugin
from tungsten_whatsapp import WhatsAppPlugin
panel = Panel(..., app_url="https://admin.example.com")
panel.plugin(LeadsPlugin())
panel.plugin(WhatsAppPlugin())
panel.create_tables(engine)
Then open WhatsApp setup in the panel and press Setup guide. It walks through every click for each way, with your own addresses filled in. The full guide, with common problems, is also in WhatsApp.
Cloud API
- At developers.facebook.com, create an app with the use case Connect with customers through WhatsApp, and add your phone number in API Setup.
- Make a permanent token: Business settings, System users, add an Admin user, give it full control of the app and the WhatsApp account, and generate a token that never expires with
whatsapp_business_messagingandwhatsapp_business_management. - In WhatsApp setup, pick Cloud API (official), fill in the Phone number ID, the WhatsApp Business Account ID, the token and the App secret, and save.
- Press More, Register number once, with a 6-digit PIN.
- In the Meta app, open Use cases, Customize next to WhatsApp, then Configuration. Paste the Callback URL and Verify token shown on the setup page, then subscribe to messages.
- Publish the app, add a payment method, and press Check connection.
WhatsApp only lets you send free text within 24 hours of the person's last message. Outside that window, use an approved template (press More, Sync templates to load them). Meta charges per message.
WhatsApp Web
- On a server with Docker, set up the free WAHA gateway with its compose file:
mkdir waha && cd waha wget -O docker-compose.yaml https://raw.githubusercontent.com/devlikeapro/waha/refs/heads/core/docker-compose.yaml touch .env # change "image: devlikeapro/waha-plus" to "image: devlikeapro/waha" (ARM server: devlikeapro/waha:arm), then: docker compose run --no-deps -v "$(pwd)":/app/env waha init-waha /app/env docker compose up -d
Copy the API key it prints. - In WhatsApp setup, pick WhatsApp Web, fill in the gateway URL (
http://127.0.0.1:3000on the same server, else an https address in front of it) and the API key, and save. - Press Link phone, then scan the QR code on your phone: WhatsApp, Linked devices, Link a device.
WhatsApp Web is not an official API. Message people who expect it and keep bulk sends small, or WhatsApp may block the number. Shared hosting can't run Docker, so the gateway needs a VPS; the panel itself can stay on shared hosting.
Metadata
Release files for tungsten-whatsapp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tungsten_whatsapp-0.1.0.tar.gz | 32.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tungsten_whatsapp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.4 kB
Release files / tungsten_whatsapp-0.1.0.tar.gz
| Download URL | tungsten_whatsapp-0.1.0.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c88e3b5f9267b211f5c98f9f3f035e7801a9a54b5777a7c1c0fb17a621e21fc
|
|
BLAKE2b-256 checksum How to use checksums |
bba277cef501f54f81160783834734717c537af5729bbce788172e1e8d04e83a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / tungsten_whatsapp-0.1.0-py3-none-any.whl
| Download URL | tungsten_whatsapp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dbbaf17da4966d8d109251fe33d705605a92cb358edaf9e25103120760a132b
|
|
BLAKE2b-256 checksum How to use checksums |
1b89a6bff96c01d5b59fe09d08a0303ad7d2965698a84912fd664c161a88e35b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|