Integrate your AI-powered chatbot with WhatsApp to reach users on one of the world's most popular messaging platforms.
Prerequisites
Setup Process
1. Phone Number ID Setup
- In your Facebook App's left sidebar, expand the WhatsApp menu.
- Select "API Setup".
- Next to "Phone Number ID", click
Copy
. - Paste this value in the
Phone Number ID
field on the Bot Setup page.
2. Access Token Setup
Choose between two types of Access Tokens:
A. Temporary Access Token (24-hour validity)
- In your Facebook App's left sidebar, expand the WhatsApp menu.
- Select "API Setup".
- In the "Temporary access token" section, click
Copy
. - Paste this value in the
Access Token
field on the Bot Setup page.
небезпека
Temporary Access Tokens expire after 24 hours. You'll need to generate a new one daily.
B. Permanent Access Token (Optional)
- Go to Business Settings.
- Select your app's associated business account.
- Under
Users
, click on System Users. - Click
Add
. - Name the system user, select
Admin
as the user role, and clickCreate System User
. - Choose the
whatsapp_business_messaging
permission. - Click
Generate New Token
. - Copy and securely store your Permanent Access Token.
3. Webhook Setup
- Copy the webhook URL from the Bot Setup page.
- Paste this URL in your Facebook account settings.
- Subscribe to Webhook Fields. Step-by-Step Guide
4. Knowledge Base Selection
- Choose a knowledge base for your chatbot.
- If none is selected, it will default to a GPT-like model.
5. Save Settings
Don't forget to save all your settings on the Bot Setup page!
Troubleshooting
If your integration isn't working:
- Double-check all IDs and tokens for accuracy.
- Ensure your WhatsApp Business Account is active.
- Verify that your Facebook Developer App has the necessary permissions.
інформація
WhatsApp's Business API has usage limits. Monitor your usage to avoid disruptions in service.
By following these steps, you'll successfully connect your AI chatbot to WhatsApp, enabling seamless communication with your users on this popular platform!