Loading repository data…
Loading repository data…
Whapi-Cloud / repository
Beginner-friendly WhatsApp bot in Python: learn to build a basic bot that responds to commands with text and images. Simple setup, detailed code comments make it easy for new developers to master WhatsApp API integration and bot functionality
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains a basic WhatsApp bot written in Python, ideal for developers who are just starting out. The bot responds to various commands with text messages and images. With straightforward setup steps and detailed comments in the code, this bot is designed to help beginners understand API integration with WhatsApp.
Follow these steps to set up and run the bot:
Get Your API Token
.env.Set Up Webhook URL
Download Ngrok from the official website and extract it.
Open the terminal and navigate to the folder where Ngrok is stored.
Run ./ngrok http PORT_NUMBER, replacing PORT_NUMBER with the port your Express server is running on locally.
Now you should have a public URL that you can use as a URL for your webhook.
Setting Up Your Bot Follow these steps to get the bot running:
cd /path/to/botpip install -r requirements.txtpython index.pyIf everything is done correctly, your bot is ready to go. Just write the test command “help” to the number connected to the API from another number.
For more detailed instructions on setup and configuration, you can watch our tutorial video on YouTube.
This bot's script contains helpful comments throughout, making it easy to understand the flow and how each function works. Here's a breakdown of the main parts:
files/: Stores media files, such as images, that the bot sends..env: Contains configuration variables like the API token and base URL.index.py: The main Python script where the bot’s logic resides.requirements.txt: Lists all necessary Python packages.This is where the primary logic of the bot resides. It:
Each function is commented to make it easier for beginners to understand how the bot works step by step. Should you have any questions or need further assistance, our support team is available and ready to help.
Happy coding!