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 my_wp_tools.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 Distribution

my_wp_tools-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

my_wp_tools-0.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file my_wp_tools-0.1.1.tar.gz.

File metadata

  • Download URL: my_wp_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for my_wp_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 27ffc1df313f109058ce9c3953a927fe42b990f2378b18cfcfdad2bc32ab8842
MD5 18b5eda71ae4a163843fcd474c9f92b5
BLAKE2b-256 63108711951e220eab21a8e08db49b3fc7c5c78f8d3eb5851303aa3a36c6a4fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: my_wp_tools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 518dcfe49bfc16d9e5c0cdc2de31830142b5c16ea4ba7e1fc853fc52e4815043
MD5 4948843aa13bc4ae4a6f6e9262b3387b
BLAKE2b-256 3a66e0f693033d9d123c6d5eaec8b5a06540ad2b593a435cd0204e42729efb8a

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