Skip to main content

What you will have

A ready-made chat app runs on your laptop.
You can start sending and receiving WhatsApp messages in two minutes.

Install and authenticate

Start sandbox session

The CLI shows a code and a QR.
Open the QR on your phone and send the prefilled WhatsApp message to HookMyApp test number.
After that, your phone is connected to this sandbox session.
HookMyApp provides the test WhatsApp number, so you can start building before you connect your own.

Clone and run starter kit

You now have a ready-made chat app running locally.
Change it, restart it, and keep testing with the HookMyApp test number.

Listen for messages

This tells HookMyApp to send sandbox WhatsApp messages to your computer while the command is running.
--path /webhook/whatsapp is the route in your local chat app that receives the messages.

Send test message

This sends a test WhatsApp message through the sandbox.
You can also WhatsApp the test number from your connected phone.
Messages appear in the starter kit chat. Reply from the chat input when you want to test sending.

Connect WhatsApp number

This opens Meta connect flow.
Choose your business, choose or create a WhatsApp Business Account, and verify the phone number.

List channels

This shows the WhatsApp numbers connected to your workspace. You can connect a brand-new number or one you already use in the WhatsApp Business app.
See Connect WhatsApp for both paths.

Pull number env values

This replaces the sandbox values in .env with values for your connected number.
Your app gets a send URL, a channel token, your phone number ID, your WhatsApp Business Account ID, your HookMyApp channel ID, a verify token, and a webhook signing secret.
Use it to send from your connected WhatsApp number.
The receiver code does not change.
Use the updated env values when you send from your connected number.

Listen locally to number

This tells HookMyApp to send messages from your connected WhatsApp number to your computer while the command is running.
--path /webhook/whatsapp is the route in your local chat app that receives the messages.
Stop the CLI with Ctrl-C when you are done.
Real WhatsApp messages to your verified number now arrive on your laptop.
You can reply from the starter kit chat with your connected number too.

Set deployed webhook URL

Run this when your receiver is deployed behind a stable public URL.

Next steps