Code Monkey home page Code Monkey logo

whatsapp_api's Introduction

Whatsapp_API

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk. Commercial use of this code/repo is strictly prohibited.

Available Scripts

In the project directory, you can run:

npm install --force

How to RUN Applicaion

npm start

First open http://localhost:5000/auth/getqr

For testing api

  • open index.js and edit the ph number in post method and message in editor

Request Body axios.post('http://localhost:5000/chat/sendmessage/91123456789', {// ph number wih your country code.91 here indicates for india


message: 'hello world from heroku docker',})


DOCKER heroku deploy commands

Download and install Docker better follow official document.

  • heroku container:login
  • heroku create app_name
  • heroku container:push web -a app_name
  • heroku container:release web -a app_name
  • heroku open -a app_name

API Doc

Auth

Getting QR Code GET : /auth/getqr

Used to get a QR Code to Log into Whatsapp Web - If not logged in, returns a QR Code - If logged in, returns a "Authenticated" message.

Chat

Sending Messages POST : /chat/sendmessage/<phone_number>

Request Body

  • message - contains the message to be sent

Sending Images POST : /chat/sendimage/<phone_number>

Request Body

  • image - contains the base64 encoded / URL of image to be sent
  • caption - (optional) - contains caption for the message

Sending PDF POST : /chat/sendpdf/<phone_number>

Request Body

  • pdf - contains the base64 encoded / URL of pdf to be sent

Sending Locations POST : /chat/sendlocation/<phone_number>

Request Body

  • latitude - contains the string of latitude
  • longitude - contains the string of longitude
  • description - (optional) - contains description for the location

Get Chat By Id GET : /chat/getchatbyid/<phone_number>

Returns a Chat


Get Chats GET : /chat/getchats

Returns an Array of all Chats

Group Chat

Sending Messages to Group POST : /group/sendmessage/<Group_Name>

Request Body

  • message - contains the message to be sent

Sending Images POST : /group/sendimage/<Group_Name>

Request Body

  • image - contains the base64 encoded / URL of image to be sent
  • caption - (optional) - contains caption for the message

Sending PDF POST : /group/sendpdf/<Group_Name>

Request Body

  • pdf - contains the base64 encoded / URL of pdf to be sent

Sending Locations POST : /group/sendlocation/<Group_Name>

Request Body

  • latitude - contains the string of latitude
  • longitude - contains the string of longitude
  • description - (optional) - contains description for the location

Contact

Get Contacts GET : /contact/getcontacts

Returns an Array of Contacts of the Current Instance


Get Contact GET : /contact/getcontact/<phone_number>

Returns a Contact


Get Profile Pic GET : /contact/getprofilepic/<phone_number>

Returns a URL of the User's Profile Picture if Privacy Settings allow it


Is Registered User GET : /contact/isregistereduser/<phone_number>

Returns if a given User is registered on Whatsapp

whatsapp_api's People

Contributors

satish603 avatar arijitbera213 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.