GithubHelp home page GithubHelp logo

lcsouzamenezes / whatsapp-api-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivansantos1/whatsapp-api

0.0 0.0 0.0 434 KB

API baseada no pacote MyZap

Home Page: https://contrateumdev.com.br/

JavaScript 95.44% Dockerfile 3.56% Shell 1.00%

whatsapp-api-1's Introduction

API Doc

First start session

Start Session

GET : https://whatsapp.contrateumdev.com.br/start?sessionName=NOME_ALEATORIO_DA_SUA_SESSAO


Get QR CODE

Get QRCODE base64

GET : https://whatsapp.contrateumdev.com.br/qrcode?sessionName=NOME_ALEATORIO_DA_SUA_SESSAO

  • json (base64) ** recommended

Request send message

Send Message

GET : https://whatsapp.contrateumdev.com.br/sendText

Request Body

  • sessionName - name of session started
  • number - number with code of country
  • text - text of send to number

Get Number Profile

Get Number Profile

GET : https://whatsapp.contrateumdev.com.br/getNumberProfile

Request Body

  • sessionName - name of session started
  • number - number with code of country

Get status session

Status Session

GET : https://whatsapp.contrateumdev.com.br/status?sessionName=NOME_ALEATORIO_DA_SUA_SESSAO


Finish close session

Close Session

GET : https://whatsapp.contrateumdev.com.br/close?sessionName=NOME_ALEATORIO_DA_SUA_SESSAO


Get QR CODE

Get QRCODE

GET : https://whatsapp.contrateumdev.com.br/qrcode?sessionName=NOME_ALEATORIO_DA_SUA_SESSAO&image=true

  • image

Request send files

Send Files

GET : https://whatsapp.contrateumdev.com.br/sendFile

Request Body

  • sessionName - name of session started
  • number - number with code of country
  • base64Data:"44696d61",//hexadecimal
  • fileName: "test.txt",
  • caption - text (optional)

Example JS send message (POST method)

$.post({
  method: 'POST',
  url: `https://whatsapp.contrateumdev.com.br/sendText`,
  contentType:"application/json; charset=utf-8",
  dataType:"json",
  data: JSON.stringify({
      sessionName: `session99`,
      number: `5531995360492`,
      text: `Olá`
  }),
  success: function(resultado, status, xhr) {
      console.log(resultado)
  }
}) 

Example JS send File (POST method)

$.post({
  method: 'POST',
  url: `https://whatsapp.contrateumdev.com.br/sendFile`,
  contentType:"application/json; charset=utf-8",
  dataType:"json",
  data: JSON.stringify({
     sessionName: "session99", 
      number: '556334140378',
      base64Data:"44696d61", //hexadecimal
      fileName:"test.txt",
      caption: "Document" //optional
  }),
  success: function(resultado, status, xhr) {
      console.log(resultado)
  }
}) 

whatsapp-api-1's People

Contributors

jhowbhz 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.