Connecting Your Bot to WhatsApp Business API
2026-03-05
by Uri Walevski
This guide walks you through setting up the official WhatsApp Business API for
your bot. At the end you'll paste a single token into your
prompt2bot dashboard and the rest is automatic.
The API can reply freely within WhatsApp's 24-hour customer service window. To
send scheduled or proactive messages outside that window, you also need a
Meta-approved message template.
Note: Meta changes some menus and texts over time, so there might be
slight variations. Talk to us if you have
trouble.
Create an App for Your Business
- Go to developers.facebook.com/apps
- Create a new app. The app name should be the name of your service (we suspect
it needs to be unique to avoid closure)
- Use case: select "Other"
- App type: select "Business"
- You can ignore the business portfolio prompt for now
Set a Privacy Policy
- In the left panel go to App > App Settings > Basic
- Set the Privacy Policy URL (you can use
https://prompt2bot.com/privacy
if you don't have your own)
- Save changes
Connect a WhatsApp Account
- In the app screen, set up WhatsApp
- You'll be prompted to create a business portfolio (or use an existing one)
- Fill in your email and business name, then submit
- You might need to wait about an hour if your account is "too new"
- In the app screen click on WhatsApp
- Select the business portfolio you created and click OK
Add Your Phone Number to the WhatsApp API
- Click on API Setup
- Under "Send and receive messages", click Add phone number
- The business name should match the portfolio
- The URL should be a website you created (we suspect it needs to be unique to
avoid closure)
- Category: Entertainment
- Verify your number using a call or SMS
- Add a payment method in WhatsApp Manager for your number
Create a Permanent Access Token
- Go to
business.facebook.com/latest/settings
- Navigate to System Users > New
- Name can be anything (e.g.
prompt2bot), role should be Admin
- Click Create System User
- Click on the new system user and Assign Assets
- Select WhatsApp Accounts, find your WhatsApp Business Account, and give
it Full Control
- Important: The WABA must be assigned as an asset before generating the
token, otherwise the token won't have access
- Click Generate Token for the app, with expiration set to Never
- Permissions should include
whatsapp_business_management and
whatsapp_business_messaging
- Generate the token, copy it and save it somewhere safe
Find Your App Secret
- Go back to
developers.facebook.com/apps and
open your app
- In the left panel go to App Settings > Basic
- Next to App Secret, click Show
- Copy the app secret and save it somewhere safe
Find Your WhatsApp Business Account ID (WABA ID)
- Go to business.facebook.com and open your
business
- Click on WhatsApp Manager in the left sidebar
- Click on your WhatsApp Business Account
- Look at the URL — it will contain something like
business_id=XXXXX&asset_id=YYYYY
- The asset_id value is your WABA ID. Copy it — you'll need it during
setup.
Connect to prompt2bot
Paste the system user token, app secret, and WABA ID into your bot's
dashboard under Channels > WhatsApp for Business and click Connect. The webhook
URL, verification, and app subscription are all set up automatically. A
verification code will also be sent to your phone via SMS.
Register Your Phone Number
After connecting, you'll receive an SMS with a verification code. Enter the code
in the dashboard and click "Verify & Register" to complete the setup. This
registers your phone number with the WhatsApp Business API so it can send and
receive messages.
If the code expires, click "Resend Code" to get a new one.
Optional: Scheduled and Proactive Messages
WhatsApp Business can only send free-form replies inside the 24-hour window
after a user messages you. For scheduled reminders or proactive messages outside
that window, create a message template in WhatsApp Manager and wait for Meta
approval.
prompt2bot can create the default scheduled-task template for you from the
WhatsApp integration skill. Ask the builder bot to create the WhatsApp task
template after your number is connected. The default template is named
prompt2bot_remote_task and contains one text variable for the message body.
Once Meta approves the template, scheduled WhatsApp Business tasks can use it
automatically when there is no active 24-hour window.
← All posts