Connect WhatsAppBeta
Use your own number, WhatsApp Business Account and Meta app
Beta
WhatsApp is in early access and must be turned on for your organization. Until it is, a call on WhatsApp answers channel_not_entitled.
You connect WhatsApp through your own Meta app. You need a Meta business portfolio (business.facebook.com → Create a business portfolio, if you have none), then the few things below.
Get ready in Meta
Do these in Meta before you open the console.
- A Meta app with WhatsApp. App Dashboard → Create app → use case Connect with customers through WhatsApp → your business portfolio. Use the app only for Mapier.
- A number on the Cloud API. App Dashboard → your app → Use cases → Connect on WhatsApp → Customize → Step 2 Production setup → Register your WhatsApp phone number. Not a number in the WhatsApp Business phone app, and not a Mapier iMessage number.
- A system user with a token. Business settings → Users → System users → Add (Admin) → Assign assets: your WhatsApp Business Account (full control) and the app → Generate new token: the app, expiration Never,
whatsapp_business_managementandwhatsapp_business_messaging. Meta shows the token once, so copy it. One token covers every number in your business. - Your app published. Publish your app (App Dashboard → Publish). Meta needs a privacy policy URL in App settings → Basic first. An unpublished app can only message people who hold a role on it.
Meta shows several IDs. Mapier asks for these:
- App ID: your Meta app's ID.
- WhatsApp Business Account ID: the ID of the account that holds your numbers.
- Phone number ID: the ID of one number. Not the phone number itself, and not the account's ID.
- Business portfolio ID: not needed.
Use a number you already have
For a number on the Cloud API in your WhatsApp Business Account. You keep the number if you leave.
Connect your Meta app
In the console, open WhatsApp and click Add line. Under Choose a number, pick Use my number and click Choose number. On Get ready in Meta, click I've done these. Then paste these four and click Connect Meta app:
- Access token: the token from Get ready in Meta, step 3.
- App secret: App Dashboard → your app → App settings → Basic → App secret → Show. Meta asks for your password again.
- App ID: App Dashboard → your app → App settings → Basic → App ID.
- WhatsApp Business Account ID: Business settings → Accounts → Messaging accounts → click your account → the ID is under its name. For Meta's test number, it is the Messaging account ID on Step 1 Try it out.
Pick your number
Paste the Phone number ID: App Dashboard → your app → Use cases → Connect on WhatsApp → Customize → Step 2 Production setup (Step 1 Try it out for Meta's test number). Or WhatsApp Manager → Phone numbers → your account; the ID is under each number. Paste the ID, not the number.
Add a Line name if you like. Only your team sees it.
Click Connect number. This accepts WhatsApp's Business Messaging Policy, and confirms that your agent serves your own business's customers and that you will not train AI models on their messages.
Add Mapier's webhook in Meta
Go to App Dashboard → your app → Use cases → Connect on WhatsApp → Customize → Step 2 Production setup → Configure Webhooks. Then:
- Paste the Callback URL and Verify token from the console. Click Verify and save. Use the app's main webhook, not a number's Override callback URL.
- Under Webhook fields, subscribe to
messages. It is required. - Also subscribe to
account_update,phone_number_quality_update,account_alertsanduser_preferences. They let Mapier pause sending when Meta restricts the number, and respect opt-outs. - If you send templates, add
message_template_status_update,message_template_quality_updateandtemplate_category_update. For groups, add the fourgroup_*fields.
If your app already sends Mapier messages for another line, this step is done for you.
Meta approval
Nothing to do. Mapier asks Meta whether the number may send. If Meta limits or blocks it, open WhatsApp Manager → Phone numbers and follow Meta's advice, then click Check again.
Open your line
The setup page says Line added. Click Open line.
How you know it worked
The line reads No traffic yet, then Live after its first message. Text the line from your phone to see the first message arrive. To check it reaches customers, text from a phone without a role on your Meta app. If your app is unpublished, only people with a role on it can message the line.
Good to know:
- Your access token and app secret go only into the console, or onto a one-time setup link. Mapier stores them encrypted and never shows them again.
- A number in the WhatsApp Business phone app must leave the app first. Export the chats you want to keep, then delete the number's account in the app.
- Your display name. Meta reviews it after the number is added. If Meta rejects it, change it in WhatsApp Manager.
- A payment method. Messages your agent starts need one on your WhatsApp Business Account. Replies to people who wrote first do not. Add one in WhatsApp Manager → Overview → Add payment method.
The reply window
You can reply freely for 24 hours after a person's last message. After that, send a template.
From the API
Your code can start a setup with POST /v1/line-setups,
using a key with the lines:write scope. The body never carries the
access token or the app secret. The response's handoffUrl is a one-time setup
link where the account owner pastes the token and the secret.
- Use a number you already have:
{"key": "whatsapp/byo_meta_app", "phoneNumberId": "…", "wabaId": "…", "metaAppId": "…", "policyAck": {…}}. All three are numeric IDs from Meta.
The policyAck fields are the account owner's own answers. Ask the account
owner for each one, and send only what they told you:
| Field | What the account owner says |
|---|---|
policyAck.useCase | Optional. What the agent is for: support, booking, notifications or other. |
policyAck.useCaseOther | Optional. With other, what it is for, in up to 200 characters. |
policyAck.ownBusinessAgent | true: the agent works for their own business. It is not a general-purpose assistant. |
policyAck.noModelTraining | true: they will not use what people send on WhatsApp to train AI models. |
Then follow the setup with
GET /v1/line-setups/{setupId}, and show the account
owner its nextStep. When the setup's state is verified,
lineId is the new line's id.
Setup checks
The setup page checks each step as you go. If a check fails, the console says what to fix. Its Docs link opens its row below; fix it, then click Check again.
| Check | What it means | What to do |
|---|---|---|
| Your details | Meta did not accept your token, app secret or IDs. | Check each against its click path, then paste again: Connect your Meta app. |
| Rules | You have not accepted WhatsApp's rules yet. | Click Connect number (Pick your number). That accepts WhatsApp's Business Messaging Policy. |
| Messages reach Mapier | Meta has not sent the number's messages to Mapier yet. | Check the callback URL, verify token and messages field in Add Mapier's webhook in Meta. Then wait a minute and click Check again. |
| Meta approval | Meta limits or blocks the number. | Open WhatsApp Manager, go to Phone numbers, and follow Meta's advice. |