Skip to content

Python chatbot WhatsApp Library#

Python library is a library for integration with WhatsApp messenger using the API service You should get a registration token and an instance ID in console to use the library. There is a free developer instance plan.


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.


To send a message or perform other Green API methods, the WhatsApp account in the phone app must be authorized. To authorize the instance, go to console 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


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