Prerequisites
- A HookMyApp account.
Sign in withhookmyapp login. - A Facebook Business Manager you control.
Meta embedded signup runs through it. - A phone number to connect.
It can be a brand-new number that is not yet on WhatsApp, or a number you already use in the WhatsApp Business app (connected through Coexistence, see below).
Run connect command
Start the embedded-signup flow with the CLI. The CLI opens a browser tab running Meta embedded-signup flow.You sign into Facebook, pick a Business Manager, create or select a WhatsApp Business Account, pick a phone number, and verify it. For Meta setup details, see Meta embedded-signup docs.
Connection options
Two kinds of number work, and you pick between them inside the same embedded-signup flow.New WhatsApp number
Add or pick the number during embedded signup and verify it with the SMS or voice code Meta sends.This is the standard path for a number that is not on WhatsApp yet.
WhatsApp Business app number
Connect the number you already use in the WhatsApp Business app, and keep using the app at the same time.During signup Meta walks you through confirming the connection from inside the WhatsApp Business app and choosing whether to share your chat history.
Once it connects, you keep replying one to one from the app while sending at scale through the API, and your messaging history stays in sync across both. The number must be on WhatsApp Business app version 2.24.17 or newer.
This kind of number sends at up to 20 messages per second.
For the full Meta walkthrough see Onboard WhatsApp Business app users.
What you get back
WHATSAPP_WABA_ID: your WhatsApp Business Account ID.
Use the channel value fromhookmyapp channels listin commands likehookmyapp channels env <channel>,hookmyapp channels webhook set <channel>, andhookmyapp channels health <channel>.
Find it withhookmyapp channels list.WHATSAPP_ACCESS_TOKEN: the channel token used to send messages.
Pull it withhookmyapp channels env <channel>orhookmyapp channels token <channel>, or copy it from the channel page in the dashboard.
Your app sends it asAuthorization: Bearer.
Use it to send from your connected WhatsApp number.WHATSAPP_PHONE_NUMBER_ID: the ID Meta assigns to your verified phone.
Used in the send URL.
Token lifetimes and rotation
Your channel token does not expire.If the channel loses permission to send, the channel health page shows it and
hookmyapp channels connect re-links the account.
If your channel token leaks, rotate it: hookmyapp channels token <channel> --rotate, or the Rotate button on the channel page.The old token stops working immediately. Print the current token anytime with
hookmyapp channels token <channel>.
Next steps
- Webhook routing: Find and set your own webhook URL.
- Send text: Send your first WhatsApp message.