Send messages to WhatsApp channel with whatsapp-web.js
Asked Answered
P

0

6

As there is no documentations about using API to send messages to Whatsapp channel, i tried this library "whatsapp-web.js" (which uses Puppeteer to run a real instance of Whatsapp Web) but didn't work for me,.. on the other hand, works perfectly for sending a message to my number .. here's the code:

const { Client } = require('whatsapp-web.js');
const client = new Client();
client.on('ready', () => {
    console.log('Client is ready!');

     client.sendMessage("12xxxxxxxxxxxxx@newsletter", "testtttttttttt");  //id hidden for security
      
});
client.initialize();

Is there any solutions or a work-arounds?

Pastiche answered 2/9, 2023 at 18:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.