whatsapp-messager


Namewhatsapp-messager JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/John-sys/whatsapp-sender_library
SummaryWhatsApp message sender using WhatsApp Business API
upload_time2024-11-06 10:39:12
maintainerNone
docs_urlNone
authorJohn Gbaya-kokoya
requires_python>=3.7
licenseNone
keywords whatsapp messaging automation api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            `whatsapp-messager` is a Python library that makes it easy to send messages using WhatsApp's official API. This library is built to interact with the WhatsApp Business API, providing a simple way to send text messages and OTP messages.

## Features

- Send OTP messages via WhatsApp.
    
- Send general text messages via WhatsApp.

## Installation

You can install the library using `pip`:

`pip install whatsapp-sender`

## Usage
To start using `whatsapp-sender`, you need to create an instance of the `WhatsAppSender` class with your access token, phone number ID, and version number.

### Import and Setup
```
from whatsapp_messager.messaging import WhatsAppSender

# Initialize the WhatsAppSender
sender = WhatsAppSender(
    access_token="your_access_token",
    phone_number_id="your_phone_number_id",
    version_number="v15.0"  # Optional, default is v15.0
)
```

### Send OTP Message

To send an OTP message:
```
response = sender.send_otp_message(recipient_phone_number="1234567890", otp="123456")
print(response)
```
### Send Text Message

To send a text message:
```
response = sender.send_text_message(
    recipient_phone_number="1234567890",
    message="Hello from WhatsApp Sender!",
    country_code="+1"  # Include the appropriate country code
)
print(response)
```
## Requirements

- Python 3.7+
    
- `requests` library

## Error Handling

The library provides basic error handling and returns success or failure messages based on the API response. If an error occurs, the response will contain details about the failure.

## License

This project is licensed under the MIT License. See the LICENSE file for details.

## Author

- John Gbaya-kokoya
    
- Email
    

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an Issue to improve the library.

## Links

- [GitHub Repository](https://github.com/yourusername/whatsapp-sender)
    
- [Bug Reports](https://github.com/yourusername/whatsapp-sender/issues)
    
- [Documentation](https://github.com/yourusername/whatsapp-sender#readme)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/John-sys/whatsapp-sender_library",
    "name": "whatsapp-messager",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "whatsapp, messaging, automation, api",
    "author": "John Gbaya-kokoya",
    "author_email": "John Gbaya-Kokoya <gbayakokoyajohnjr@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b0/72/392ae5ee308d0c39286f17ccd3bb5119cadc7746cc913c7b2f46458b3153/whatsapp_messager-0.0.3.tar.gz",
    "platform": null,
    "description": "`whatsapp-messager` is a Python library that makes it easy to send messages using WhatsApp's official API. This library is built to interact with the WhatsApp Business API, providing a simple way to send text messages and OTP messages.\n\n## Features\n\n- Send OTP messages via WhatsApp.\n    \n- Send general text messages via WhatsApp.\n\n## Installation\n\nYou can install the library using `pip`:\n\n`pip install whatsapp-sender`\n\n## Usage\nTo start using `whatsapp-sender`, you need to create an instance of the `WhatsAppSender` class with your access token, phone number ID, and version number.\n\n### Import and Setup\n```\nfrom whatsapp_messager.messaging import WhatsAppSender\n\n# Initialize the WhatsAppSender\nsender = WhatsAppSender(\n    access_token=\"your_access_token\",\n    phone_number_id=\"your_phone_number_id\",\n    version_number=\"v15.0\"  # Optional, default is v15.0\n)\n```\n\n### Send OTP Message\n\nTo send an OTP message:\n```\nresponse = sender.send_otp_message(recipient_phone_number=\"1234567890\", otp=\"123456\")\nprint(response)\n```\n### Send Text Message\n\nTo send a text message:\n```\nresponse = sender.send_text_message(\n    recipient_phone_number=\"1234567890\",\n    message=\"Hello from WhatsApp Sender!\",\n    country_code=\"+1\"  # Include the appropriate country code\n)\nprint(response)\n```\n## Requirements\n\n- Python 3.7+\n    \n- `requests` library\n\n## Error Handling\n\nThe library provides basic error handling and returns success or failure messages based on the API response. If an error occurs, the response will contain details about the failure.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Author\n\n- John Gbaya-kokoya\n    \n- Email\n    \n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request or open an Issue to improve the library.\n\n## Links\n\n- [GitHub Repository](https://github.com/yourusername/whatsapp-sender)\n    \n- [Bug Reports](https://github.com/yourusername/whatsapp-sender/issues)\n    \n- [Documentation](https://github.com/yourusername/whatsapp-sender#readme)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "WhatsApp message sender using WhatsApp Business API",
    "version": "0.0.3",
    "project_urls": {
        "Documentation": "https://github.com/John-sys/whatsapp-sender_library?tab=readme-ov-file",
        "Homepage": "https://github.com/John-sys/whatsapp-sender_library?tab=readme-ov-file",
        "Issues": "https://github.com/John-sys/whatsapp-sender_library/issues",
        "Repository": "https://github.com/John-sys/whatsapp-sender_library"
    },
    "split_keywords": [
        "whatsapp",
        " messaging",
        " automation",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b298fb4ca2fae3fb44cecafd357cf9bbb81ebc2b50dc4936ffa4b501b4567048",
                "md5": "df572bcac2ec58d05c6a58911de432f6",
                "sha256": "e080262cf76c8bac10b92ff6431899bcf66f7cec9e019a734e35155513791066"
            },
            "downloads": -1,
            "filename": "whatsapp_messager-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df572bcac2ec58d05c6a58911de432f6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 3769,
            "upload_time": "2024-11-06T10:39:10",
            "upload_time_iso_8601": "2024-11-06T10:39:10.414503Z",
            "url": "https://files.pythonhosted.org/packages/b2/98/fb4ca2fae3fb44cecafd357cf9bbb81ebc2b50dc4936ffa4b501b4567048/whatsapp_messager-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b072392ae5ee308d0c39286f17ccd3bb5119cadc7746cc913c7b2f46458b3153",
                "md5": "3012ba840487c89b425ce6f051fbf0d0",
                "sha256": "5ec7f5361d48052647f6b57fd424126ed1d015ef91a32dc77e7093a8012613e3"
            },
            "downloads": -1,
            "filename": "whatsapp_messager-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3012ba840487c89b425ce6f051fbf0d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3999,
            "upload_time": "2024-11-06T10:39:12",
            "upload_time_iso_8601": "2024-11-06T10:39:12.046719Z",
            "url": "https://files.pythonhosted.org/packages/b0/72/392ae5ee308d0c39286f17ccd3bb5119cadc7746cc913c7b2f46458b3153/whatsapp_messager-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 10:39:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "John-sys",
    "github_project": "whatsapp-sender_library",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "whatsapp-messager"
}
        
Elapsed time: 0.56010s