WhiskeySockets/Baileys ? reverse-engineered prompt

Reverse engineered prompt

I want to build a tool that lets me programmatically interact with WhatsApp. It should be a TypeScript library that runs in Node.js and connects to the WhatsApp Web API using WebSockets, similar to how the Baileys project works.

The main functions I need are to connect to WhatsApp (handling the QR code scan part), send and receive text messages, and maybe get a list of my contacts and groups. It should be able to listen for events like a new message arriving and then let me trigger a response.

Essentially, I'm looking for a simple, unofficial WhatsApp bot API for a personal project. Please structure it as a clean Node.js project with a basic example script showing how to log in and send a "hello world" message to a specific phone number. You can look up docs on how the WhatsApp Web protocol works if needed.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab