How to send a Whatsapp message with python

Photo by Christian Wiediger on Unsplash

Hi everyone! Today I’m building an text-to-whatsapp python app

Bellow, I have the code, and I will explain everything in the comments.

Oh, but first run the following commands:

And here we have our code:

To use this code, you must have Whatsapp installed and a 1536x864 (width x height screen. If you don’t have a screen of that dimensions, open WhatsApp, execute the following code, and immediately position your mouse over the close button and the send button of WhatsApp. The program sleeps 5 seconds after execution. Then, change the X and Y coordinates of the functions to the results.

Bye! Please clap 👏 (I would love 50 claps!) if you like this post 😀. If you need help, just comment.



Hi! I'm Tiago, a student at Lisbon, Portugal.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store