Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lipskiyp/whatsappbot
WhatsApp API Bot with a Flask server.
https://github.com/lipskiyp/whatsappbot
api flask ngrok python whatsapp whatsapp-bot
Last synced: 4 days ago
JSON representation
WhatsApp API Bot with a Flask server.
- Host: GitHub
- URL: https://github.com/lipskiyp/whatsappbot
- Owner: lipskiyp
- Created: 2023-10-06T16:59:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-30T08:51:32.000Z (8 months ago)
- Last Synced: 2024-03-30T09:29:06.637Z (8 months ago)
- Topics: api, flask, ngrok, python, whatsapp, whatsapp-bot
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WhatsApp API Bot (In Progress)
WhatsApp API Bot with a Flask server, launched using ngrok.
### The server can currently handle:
* Initial webhook configuration and token verification with Meta.
* Incoming messages - server marks the incoming message as "read" and responds with a default greeting text message.
* Prints status updates for sent messages (e.g. "delivered", "read" etc.)### The app requires the following variables to be stored inside the environment for it to work:
* WHATSAPP_TOKEN - (temporary) Meta access token (can be found inside the "API Set Up" section on the Meta for Developers website).
* VERIFY_TOKEN - your own verification token to be used for the webhook configuration (can be any string).
* GRAPH_BASE_API - base API url (currently version 17 is used - https://graph.facebook.com/v17.0/).
* PHONE_NUMBER_ID - your sender WhatsApp phone number id.## main.py
Flask main app with all of the server endpoints.
## /helpers/verify_webhook.py
Handles the initial webhook set up and token verification logic for GET requests to /mywebhook endpoint.
## /helpers/handle_webhook.py
Handles webhook notifications for POST requests to /mywebhook endpoint.
## /helpers/handle_messages.py
Handles logic for text messages.