The Node.js SDK re-exports the WAJS namespace for TypeScript. This reference describes types from WA-JS 4.8.5-rc.0. For operations available on a connected Node.js client, see Whatsapp. For functions running inside WhatsApp Web, see the WA-JS browser API.
// Simple com start time and end
WPP.chat.sendEventMessage('[number]@c.us', {
name: "Title of event"
description: 'Description of your event',
startTime: 1729551600
endTime: 1729551900
});
// Event with location
WPP.chat.sendEventMessage('[number]@c.us', {
name: "Title of event"
description: 'Description of your event',
startTime: 1729551600
location: {
degreesLatitude: -22.9518551,
degreesLongitude: -43.2108338,
name: 'Cristo Redentor - RJ',
}
});
// Event with link for call (use voice or video)
WPP.chat.sendEventMessage('[number]@c.us', {
name: "Title of event"
callType: 'voice',
description: 'Description of your event',
startTime: 1729551600
});
Send a Event Message