由于没有关于使用 API 向 Whatsapp 频道发送消息的文档,我尝试了这个库“whatsapp-web.js”(它使用 Puppeteer 来运行 Whatsapp Web 的真实实例),但对我来说不起作用,..另一方面,非常适合向我的号码发送消息..这是代码:
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();
有什么解决方案或解决方法吗?
你是如何找到频道ID的?