r/Python • • Dec 18 '20

Intermediate Showcase I have updated my Whatsapp API

This is a project I have been working on for quite a while. It is an alternative to the Whatsapp business API using Selenium with the Chrome webdriver. Currently it can/has:

  • send messages

  • listen for messages

  • smart error handling

  • command decorators

  • send files

  • picture downloading

So its been a while since I have updated my Whatsapp API, but since the lockdown came back I started working on it again. I have added things that I learned the past couple of months, like type hinting and documenting. I have used the Google style guide to document my code and I have also used Pylint on this project. I have simplified some things and I added a tutorial. I am asking for feedback for my code, documentation and tutorial. Feel free to use my code in your own project, but please give credit to me. The GitHub of the project is https://github.com/NaN8279/whatsapp-client. The tutorial and the documentation are on the wiki of the GitHub.

49 Upvotes

10 comments sorted by

3

u/xPeacefulDreams Dec 18 '20

Awesome project! May I ask what the advantages are compared to the Business API?

4

u/[deleted] Dec 19 '20

The Whatsapp business API costs money and you need to have a big company

1

u/360martin May 16 '21

You can get the official API from 29 EUR per month via official BSPs (in this case 360dialog, I work for them) and you can get access also as a small company. The relevant requirement is to have a Facebook Business Manager Account.

1

u/SnowdenIsALegend Dec 19 '20

Nice work! Do we need to scan the WhatsApp QR code everytime we run your API?

3

u/[deleted] Dec 19 '20

I updated my Whatsapp API. It now stores Whatsapp data so you don’t have to scan the code every time. I am also working on a headless mode, currently it can show the QR-code in a picture viewer, but I am working on a fully supported mode.

1

u/SnowdenIsALegend Dec 19 '20

That's awesome man, good work!

2

u/[deleted] Dec 19 '20

Unfortunately, yes. Selenium doesnt store cookies

1

u/simplyfatal77 Jan 09 '21

Where can I see the documentation? I dont know how to run it