Skip to content

Python chatbot WhatsApp Library#

Python library is a library for integration with WhatsApp messenger using the API service green-api.com. You should get a registration token and an account ID in your personal cabinet to use the library. There is a free developer account tariff.

API#

The documentation for the REST API can be found at the link. The library is a wrapper for the REST API, so the documentation at the link above also applies.

Authorization#

To send a message or perform other Green API methods, the WhatsApp account in the phone app must be authorized. To authorize the account, go to your cabinet and scan the QR code using the WhatsApp app.

How to install WhatsApp python chatbot library and setup environment#

How to run WhatsApp python chatbot library and write your own bot#

How to start receiving and answering messages#

How to receive other notifications and handle the notification body#

How to filter incoming messages#

How to handle buttons#

Example of a bot#

GREEN-API demo chatbot 🔥#

How to run a demo chatbot locally from a docker container?#

Service methods documentation#

Service methods documentation

License#

Licensed under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) terms. Please see file LICENSE.