GithubHelp home page GithubHelp logo

sudoferraz / webwhatsapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mukulhase/webwhatsapp-wrapper

0.0 1.0 0.0 153 KB

An API for sending and receiving messages over web.whatsapp [Working as of 25h December 2017]

License: MIT License

Python 75.87% JavaScript 24.13%

webwhatsapi's Introduction

WebWhatsAPI (Based on web.whatsapp.com)

What is it?

This package is used to provide a python interface for interacting with WhatsAPP Web to send and receive Whatsapp messages.

Installation

Dependencies

You will need to install Gecko Driver separately, if using firefox, which is the default.

From Source

  • Clone the repository
  • Use `pip install -r requirements.txt' to install the required packages.

From PyPI

  • Install from pip pip install webwhatsapi

Usage

  1. Import library from webwhatsapi import WhatsAPIDriver

  2. Instantiate driver and set username driver = WhatsAPIDriver(username="mkhase") Possible arguments for constructor:

    • client : Type of browser. The default is Firefox, but Chrome and Remote is supported too.
    • username : Can be any value.
    • proxy: The proxy server to configure selenium to. Format is ":"
    • command executor: Passed directly as an argument to Remote Selenium. Ignore if not using it.
    • loadstyle: Default is true. If true, doesn't load the styling in the browser.
    • profile: Pass the full path to the profile to load it. Profile folder will be end in ".default". For persistent login, open a normal firefox tab, log in to whatsapp, then pass the profile as an argument.
  3. Use the get_qrcode() function to save the QR code in a file, for remote clients, so that you can access them easily. Scan the QR code either from the file, or directly from the client to log in. driver.get_qr()

  4. In case the QR code expires, you can use the reload_qr function to reload it driver.reload_qr()

  5. Viewing unread messages driver.view_unread()

  6. Viewing all contacts driver.get_all_chats()

  7. To send a message, get a Contact object, and call the send_message function with the message. <Contact Object>.send_message("Hello")

Limitation

Phone has to be on and connected to the internet

Capabilities

  • Read recent messages
  • Get unread messages
  • Send text messages
  • Get List of Contacts
  • Get List of Groups
  • Get information about Groups
  • Get various events. For example: Leaving, Joining, Missed Call etc.

Note:

There are issues with asynchronous calls in Chrome. Primary support of this api is for firefox. If something doesn't work in chrome, please try firefox.

Known issues with chrome:

  • Group Metadata

For more queries, contact: [email protected]

Use Cases

  • Auto Reply bot for whatsapp, “I am away from phone”
  • Can use whatsapp on phone and this api at the same time, (unlike the other whatsapp APIs, since this uses web.whatsapp)
  • No need for number registration
  • Hackathons, very easy to setup a whatsapp messaging service.
  • API for custom bot making
  • Whatsapp cloud(A service): User can access and send messages from anywhere without scanning qr anymore, just simple user login and password

webwhatsapi's People

Contributors

mukulhase avatar adarshsanjeev avatar prehensilebbc avatar codemanat avatar lucasrcezimbra avatar azixus avatar cedriczirtacic avatar

Watchers

Gabriel Ferraz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.