Skip to main content

Easily send WhatsApp messages from Python using the Meta WhatsApp Cloud API.

Project description

WhatsApp Message Sender Library

Easily send WhatsApp messages from your Python code using the official Meta WhatsApp Cloud API.

What Problem Does This Solve?

  • No more struggling with raw HTTP requests or complex setup.
  • Just plug in your Meta API credentials and send messages with a single function call.
  • Perfect for notifications, alerts, or any automation that needs WhatsApp messaging.

Features

  • Simple, plug-and-play API
  • Input validation and clear error messages
  • Custom exception handling

Quick Start

  1. Install dependencies:

    pip install requests
    
  2. Example usage:

    from whatsapp_lib.client import WhatsAppClient
    
    client = WhatsAppClient(
        access_token="YOUR_META_TOKEN",
        phone_number_id="YOUR_PHONE_NUMBER_ID",
        business_account_id="YOUR_BUSINESS_ACCOUNT_ID"
    )
    
    try:
        client.send_message(
            to="+1234567890",
            message="Hello from my library!"
        )
    except Exception as e:
        print("Error sending message:", e)
    

Dependencies

  • Python 3.7+
  • requests

Note

  • You need a valid Meta (Facebook) WhatsApp Cloud API token, phone number ID, and business account ID.
  • This library is for sending messages only (no incoming message/webhook support in v1).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_wp_tools-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file my_wp_tools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: my_wp_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for my_wp_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 220c2e3b52edca66d6349ba6d690d3c1470635299f5611b42e87674d25787b8e
MD5 bf1920f68ff961213af3c38028303c02
BLAKE2b-256 546f038006cc63e87714207a7e91d334585b649982d46e1e720a1a8796073185

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page