filipporomani / whatsapp-python

Open source Python wrapper for the WhatsApp Cloud API.
https://pypi.org/project/whatsapp-python/
GNU Affero General Public License v3.0
90 stars 18 forks source link

Fixed bugs related to verification #23

Closed pptx704 closed 7 months ago

pptx704 commented 7 months ago

Added fix for the following error-

  File "/path/to/env/lib/python3.11/site-packages/whatsapp/__init__.py", line 97, in verify_endpoint
    self.verification_handler(challenge)
TypeError: WhatsApp.__init__.<locals>.base() takes 0 positional arguments but 1 was given

This was solved by using *args argument for base.

Additionally return type for challenge has been changed to int from str since Facebook expects just the number that is not wrapped with \"