GithubHelp home page GithubHelp logo

sthales / baileys-rest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coolnickname/baileys-rest

0.0 0.0 0.0 24 KB

A REST server with endpoints for the Baileys whatsapp web API

JavaScript 100.00%

baileys-rest's Introduction

baileys-REST

A REST server with endpoints for the Baileys whatsapp web API

The code has a ton of comments explaining how to use it, including detailed examples of what the request body should look like in POST requests. I'll see if I can redact my postman project and upload that too, but for now if you don't understand something or need an example just open up an issue.

All responses from the server are in this format:

{
    "succes" : true/false,
    "response" : "",
    "error" : "",
    "data" : {}
}

The response is either a JSON object or a JSON array of the results of your request. If there is no result it's just empty. "data" is currently unused. Succes and error don't need explaining.

To connect for the first time you need to send a POST request to /client/connect with an empty body. This will show the QR code in the terminal for you to scan, and when logged in will return the auth tokens as "response" in the above format. To sign in after that either send a POST to the same endpoint but with these tokens in the request body (in the same format your received them in the "response" element), or put them in the authData element at the top of the script to automatically log in when starting the server.

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.