Olá, tudo bem?
Crie um WhatsApp Message Control Panel em node que realize o envio de mensagens para Whatsapp com a Evolution API.
Rota exemplo de envio de mensagens:
const options = {
method: 'POST',
headers: {apikey: '', 'Content-Type': 'application/json'},
body: '{"number":"","options":{"delay":123,"presence":"composing","linkPreview":true,"quoted":{"key":{"remoteJid":"","fromMe":true,"id":"","participant":""},"message":{"conversation":""}},"mentions":{"everyOne":true,"mentioned":[""]}},"textMessage":{"text":""}}'
};
fetch('https://{server-url}/message/sendText/{instance}', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Minha evolution está rodando em http://localhost:8088/ e a key é 429683C4C977415CAAFCCE10F7D57E11
No front, preciso de uma local para selecionar a instancia que pode ser buscado pela rota:
const options = {method: 'GET', headers: {apikey: ''}};
fetch('https://{server-url}/instance/fetchInstances', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));