Skip to main content

Start session

Open the QR on your phone and send the prefilled WhatsApp message to the HookMyApp test number. That phone is now connected to the sandbox session.

Listen for messages locally

Keep the command running while you test. HookMyApp sends sandbox WhatsApp messages to that route.

Send test message

The sandbox only sends to your connected phone. There is no --to flag on sandbox send.

Env values

Write the sandbox env values to a .env file your server can load.
  • WEBHOOK_HMAC_SECRET: the HMAC secret your server uses to verify X-HookMyApp-Signature-256 on incoming webhooks.
  • VERIFY_TOKEN: the value your server echoes back on the one-time verification GET when you run sandbox webhook set. Not the HMAC secret.
  • PORT: where your local server listens. Defaults to 3000.
  • WHATSAPP_API_URL: the sandbox send URL.
  • WHATSAPP_ACCESS_TOKEN: the sandbox channel token used to send messages.
  • WHATSAPP_PHONE_NUMBER_ID: the ID of the test number.

Manage session

  • Start: run hookmyapp sandbox start, then send the code to HookMyApp test number from your phone.
  • Lifetime: a session stays active until you stop it or start a new one.
  • Restart: run hookmyapp sandbox start again and send the new code from the same phone.
  • Stop early: hookmyapp sandbox stop tears down the session immediately.

Inspect messages

  • hookmyapp sandbox logs streams the session delivery log. Add --follow to tail it live and --verbose for full bodies.
  • hookmyapp sandbox webhook show prints where sandbox messages are delivered. hookmyapp sandbox webhook set overrides it and hookmyapp sandbox webhook clear reverts to the CLI-managed default.

Limitations

  • You can only message your connected phone.
  • Template messages are blocked in the sandbox.
  • Connect your own WhatsApp number when you are ready for real customers.