Skip to content

WhatsApp

Connecting WhatsApp (Meta Cloud API): step by step

Create a Meta app, get your phone number ID, WhatsApp Business Account ID, permanent access token and app secret, and connect the webhook.

WhatsApp works through your own WhatsApp Business Account on Meta's Cloud API. Setting it up takes about 20–30 minutes. You do it once, in Meta's websites, and paste five values into Settings → Integrations → WhatsApp (Meta Cloud API). Only an Admin can change integrations.

Before you start

  • A Facebook account, and a Meta Business portfolio for your company. Create one at business.facebook.com if you do not have one.
  • A phone number for your business WhatsApp that can receive an SMS or a call. It must not be in use on the WhatsApp or WhatsApp Business phone app; if it is, delete that WhatsApp account on the phone first.
  • Keep Settings → Integrations open in another tab, so you can paste each value as you get it.

Step 1: Create a Meta app

  1. Go to developers.facebook.com, sign in, and select My Apps → Create app.
  2. Choose the use case Connect with customers through WhatsApp. If Meta asks for an app type, choose Business.
  3. Name the app (for example "Your company CRM"), pick your business portfolio, and create it.

Step 2: Add your number (Phone number ID and WhatsApp Business Account ID)

  1. In your app, open WhatsApp → API Setup.
  2. Select Add phone number. Enter your business display name, category and the phone number, then verify it with the code Meta sends.
  3. Back on API Setup, choose your number in the From list.
  4. Copy the Phone number ID and paste it into Phone number ID in Settings → Integrations.
  5. Copy the WhatsApp Business Account ID and paste it into WhatsApp Business Account ID.

Meta also offers a free test number. It can only message up to five numbers you verify, so use your own number for real work.

Step 3: Create a permanent access token

The token shown on the API Setup page expires after 24 hours, so do not use it. Create a permanent one from a system user instead:

  1. Open business.facebook.com/settings and go to Users → System users. Select Add, give it a name such as "CRM", and choose the Admin role.
  2. Select the new system user, then Assign assets (or Add assets). Add your app with full control, and your WhatsApp account with full control. Save.
  3. Select Generate new token. Choose your app, set the expiry to Never, and tick the permissions whatsapp_business_messaging and whatsapp_business_management (and business_management if it is listed). Generate.
  4. Copy the token straight away (Meta shows it only once) and paste it into Permanent access token.

Step 4: Copy the app secret

  1. In developers.facebook.com, open your app and go to App settings → Basic.
  2. Next to App secret, select Show (Meta may ask for your password), copy it and paste it into App secret.

Step 5: Choose a verify token and save

  1. In Webhook verify token, type any secret phrase you make up, for example a mix of 20 or more letters and numbers. Keep it for the next step.
  2. Leave Graph API version as v20.0 unless you want a newer version shown on Meta's API Setup page.
  3. Select Save. Saved secrets are never shown again; to keep one later, leave its field blank.

Step 6: Connect the webhook in Meta

This is what lets replies from your leads reach the WhatsApp inbox. Do it after saving step 5, or Meta's check will fail.

  1. Copy the Webhook URL shown on the WhatsApp card in Settings → Integrations (it ends in /api/v1/webhooks/whatsapp).
  2. In your Meta app, open WhatsApp → Configuration and select Edit next to Webhook.
  3. Paste the URL as the Callback URL, enter the same verify token you saved in step 5, and select Verify and save.
  4. Under Webhook fields, select Manage and subscribe to messages.

Step 7: Go live

  • Register the number for sending: on the WhatsApp card in Settings → Integrations, open Register number for sending, type a 6-digit PIN and select Register. Meta needs this once per number; until it is done templates still sync, but every send fails with "(#133010) Account not registered". The PIN is the number's two-step verification PIN: if one was set before, use that same PIN. If the number is still in use in the regular WhatsApp or WhatsApp Business phone app, it has to be removed from that app first.
  • Switch your app from Development to Live (the toggle at the top of the app dashboard). Meta asks for a privacy policy URL in App settings → Basic first. In Development mode only test numbers work.
  • In WhatsApp Manager (business.facebook.com/wa/manage), add a payment method. Meta charges for template messages you start; replies within 24 hours of a customer message are free.
  • Meta reviews your display name, which can take up to a day. Messages work meanwhile, with lower sending limits.

Step 8: Test it

  1. From your own phone, send a WhatsApp message to your business number. It should appear in WhatsApp → Inbox within a few seconds.
  2. Reply from the inbox and check it arrives on your phone.
  3. To message leads first, use approved templates: see WhatsApp templates and bulk campaigns.

If something does not work

  • Meta says the callback URL or verify token could not be validated: the verify token in Meta must match the one saved here exactly, and it must be saved here first.
  • Messages you send work, but replies never arrive: the messages webhook field is not subscribed, or the app is still in Development mode.
  • Sending fails after a day with an expired-token error: you used the temporary token from API Setup. Create the system-user token in step 3.
  • Sending fails with "(#133010) Account not registered": the number is not registered for sending yet. Use Register number for sending on the WhatsApp card in Settings → Integrations (step 7).
  • Sending fails with "recipient phone number not in allowed list": you are on Meta's test number. Add your own number (step 2).
  • Saving says the number is already connected: a WhatsApp number can be connected to only one company account.