Giter Site home page Giter Site logo

whatsapp-api's Introduction

WHATSAPP API

It is inspired base on https://github.com/pedroslopez/whatsapp-web.js

RUN THE SCRIPT

  1. npm install.
  2. The server will start on port 3030 (http://127.0.0.1:3030).
  3. Access to /generate (GET REQUEST) to generate QR code for Whatsapp API.
  4. Copy the imageUrl response, open it on browser, and scan it with your Whatsapp app.
  5. After you got the "Client is Ready!" response in the console, you can now send message or send media message to other Whatsapp User.

SEND MESSAGE

Make a POST REQUEST to /sendMessage with JSON body, number and message.

Example :

{ "number": "6285267671232", "message": "Hello world" }

If you want to send to multiple number (add coma "," in number), here is the example :

{ "number": "6285267671232, 6287812123434, 6282132321212", "message": "Hello world" }

Please note that the phone number format is an international format without + sign.

SEND MEDIA MESSAGE

Make a POST REQUEST to /sendMedia with form-data (Form Data) body, file, message and number.

file : file to upload
number : number to send
message : caption for file

Example (Multiple Numbers) :

file : media.pdf (file)
number : 6285267671232, 628231212444, 625234345656 (String or Number)
message: this is the test caption (String or Number)

Example (Single Number) :

file : media.pdf (file)
number : 6285267671232 (String or Number)
message: this is the test caption (String or Number)


Please note that the phone number format is an international format without + sign.

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.