1.0.4 • Published 2 years ago

whatsapp-cloud.js v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

🚀 Getting started

import { Client } from 'whatsapp-cloud.js'

const client = new Client({
  auth: {
    accessToken: process.env.ACCESS_TOKEN,
    phoneNumberID: process.env.PHONE_NUMBER_ID,
  },
});

client.on("message", async (message) => {
    await client.messages.sendTextMessage(
        `Did you said "${message.text}"?`,
        message.from
    );
});

client.initializeWebhook(3000).then(() => {
  console.log("Ready!");
});

💡 Documentation

You can find the documentation at https://thallesp.github.io/whatsapp-cloud.js (docs in beta).
You can find examples at the examples folder.

📋 TODO

x - Ability to send text messages
x - Finish HTTP server to receive Whatsapp events
x - Ability to send template messages
x - Ability to send reply buttons
x - Ability to send sections
[] - Ability to send document messages

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago