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.

whatsapp-api's People

Contributors

gusfahmi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

whatsapp-api's Issues

[NOT AN ISSUE] Thank you for sharing your API with us!

Hello @gusfahmi

I just would like to say THANK YOU SO MUCH for making an API and keeping the code simple and understandable so people like me that is starting in javascript can learn how express works along with whatsapp-web.js!

I've been searching for months an API that uses whatsapp-web.js, but like yours with just a few lines of codes and not one thousand of lines of code! Idk how you did an API with just like 170 lines of code that works that good!

Since this is the best API i found for my use-case because its really lightweight and not alot of code, it will be really useful in my project, can i use it in my project โค๏ธ ?

Thank you again! ๐Ÿ˜„ ๐Ÿ‘Š ๐Ÿš€ ๐Ÿ‘ ๐Ÿ’ฏ

cannot run script

hi
cannot run script .
how can run script in localhost and send message?
when i run scrip return "cannot Get" error .

How to mention a name

Hello guys.

Thank you so much for your api. I would like you to share with me an example of use by using the name for each phone number so that the message can look like a customized message for each phone number.

Thank you in advance for your help.

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.