{"id":16967694,"url":"https://github.com/whapi-cloud/python-whatsapp-chatbot","last_synced_at":"2025-03-17T08:37:51.856Z","repository":{"id":205304707,"uuid":"713919328","full_name":"Whapi-Cloud/python-whatsapp-chatbot","owner":"Whapi-Cloud","description":"WhatsApp Python Bot. The basic functionality you will need when developing a bot: sending and receiving messages, sending a picture, file, document, video, as well as creating a group and sending a message to the WhatsApp group","archived":false,"fork":false,"pushed_at":"2024-06-14T07:46:32.000Z","size":2705,"stargazers_count":53,"open_issues_count":0,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-16T10:23:28.389Z","etag":null,"topics":["api","bot","chatbot","cloud","groups","whatsapp","whatsapp-api","whatsapp-automation","whatsapp-bot","whatsappbot"],"latest_commit_sha":null,"homepage":"https://whapi.cloud/features","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Whapi-Cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-03T14:14:14.000Z","updated_at":"2025-03-13T18:57:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"89f74302-b448-4129-a488-2ead1820c5ca","html_url":"https://github.com/Whapi-Cloud/python-whatsapp-chatbot","commit_stats":null,"previous_names":["whapi-cloud/python-whatsapp-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whapi-Cloud%2Fpython-whatsapp-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whapi-Cloud%2Fpython-whatsapp-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whapi-Cloud%2Fpython-whatsapp-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Whapi-Cloud%2Fpython-whatsapp-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Whapi-Cloud","download_url":"https://codeload.github.com/Whapi-Cloud/python-whatsapp-chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244001640,"owners_count":20381805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bot","chatbot","cloud","groups","whatsapp","whatsapp-api","whatsapp-automation","whatsapp-bot","whatsappbot"],"created_at":"2024-10-14T00:09:26.063Z","updated_at":"2025-03-17T08:37:51.403Z","avatar_url":"https://github.com/Whapi-Cloud.png","language":"Python","readme":"# Python Whatsapp ChatBot\nWhatsApp Python Bot. The basic functionality you will need when developing a bot: sending and receiving messages, sending a picture, file, document, video, as well as creating a group and sending a message to the WhatsApp group\n\n## WhatsApp Python Bot (Whapi.Cloud WhatsApp API)\nThis example of the WhatsApp bot implementation touches in detail on the most frequently used functionality: send message, send file, create group, send message to WhatsApp Group. This will allow you to adapt WhatsApp API and source code to your tasks and needs, or take it as a basis for creating any other integration.\nIn the source code of the bot you will find the following functionality:\n\u003cul\u003e\n  \u003cli class=\"d-flex\"\u003eRespond to an unfamiliar command, this could be an instruction or your welcome message;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend regular message;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend image;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend file;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend video;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend contact (vCard);\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eSend product;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eCreate new group, send an invitation and send message to the group;\u003c/li\u003e\n  \u003cli class=\"d-flex\"\u003eReceive and reading incoming messages;\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cem\u003eFor the bot to work, it is \u003cb\u003eNOT REQUIRED\u003c/b\u003e that the phone is turned on or online. Connect the number and test the integration comfortably!\u003c/em\u003e \u003cbr/\u003e And if you need any help, just write to us in the support chat on any page of the site: https://whapi.cloud/features\n\n## Getting Started\n\n### Step 1: Install Python and pip\n1. Download and install Python from the official website https://python.org.\n2. Verify that pip is installed along with Python.\n\n### Step 2: Install Dependencies\nInstall the necessary libraries listed in requirements.txt:\n1. Open the command line or terminal.\n2. Navigate to your project directory.\n3. Run the command:\n```sh\npip install -r requirements.txt\n```\nThis installs all libraries specified in the requirements.txt file.\n\n### Step 3: Configure the Project\nConfigure your project settings: Open the \u003cb\u003e.env\u003c/b\u003e file in your IDE. Set up configurations such as your API token and webhook URL\n\n### Step 4: Run the Bot\nLaunch your bot using Python:\n1. Ensure you are in the project directory in your terminal.\n2. Execute the command:\n```sh\npython index.py\n```\n\nLearn more about how to configure the webhook to work locally here: https://support.whapi.cloud/help-desk/receiving/webhooks/how-to-check-the-webhook#how-to-test-webhook-locally \n\n### How to Connect to Whapi.Cloud and get API Token\nRegistration: https://panel.whapi.cloud/register\nThe first step is to register on the Whapi.Cloud website and create an account. \u003cb\u003eIt's free and doesn't require you to enter a credit card.\u003c/b\u003e\nAfter registration you will immediately have access to a test channel with a small limitation. Wait for it to start (it usually takes about a minute). You will need to connect your phone for Whatsapp automation. It is from the connected phone that messages will be sent. The big advantage of the service is that it takes only a couple of minutes to launch and start working.\n\n![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ep3pc4jsna9pzagfouj8.png)\n\nTo connect your phone, use the QR code available when you click on your trial channel in your personal account. Then open WhatsApp on your mobile device, go to Settings -\u003e Connected devices -\u003e Connect device -\u003e Scan QR code.\n\nIn the second and third steps, the service will ask you to customize the channel: write its name for your convenience, set webhooks, change settings. All these steps can be skipped, and we will come back to webhooks a little later. After launching, you will find in the center block under the information about limits, your API KEY, that is Token. This token will be used to authenticate your API requests. Generally, it's added to the request headers as a Bearer Token or simply as a request parameter, depending on the API method you're using.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhapi-cloud%2Fpython-whatsapp-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhapi-cloud%2Fpython-whatsapp-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhapi-cloud%2Fpython-whatsapp-chatbot/lists"}