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?