Manual Configuration
For more complex use cases, you can use your own Meta app with our integration. This configuration is optional, and most builders should use the simple one-click-install setup wizard.
Optional: Manual Configuration
For more complex use cases, you can use your own Meta app with our integration.
Prerequisites
- A Meta developer app. Check out this article to learn more about the setup.
Enable Manual Configuration
- Go to the Integration Hub in Botpress Cloud (if you don't have the integration installed yet).
- Find and open the WhatsApp integration then click on the "Install to Bot" button, now go back to your bot.
- Enable "Use Manual Configuration"
The WhatsApp integration will have the following settings:
1. Verify Token
The Verify Token is used by Meta to verify that you are the real owner of the provided webhook.
You can generate any random alphanumeric string for this configuration. Paste it in your Verify Token channel configuration.
2. Phone Number ID
- In your Meta App's left sidebar, expand the WhatsApp menu and select Getting Started
- In the Send and receive messages section, beside the label Phone Number ID click Copy then paste it in the Phone Number ID field in Botpress
3. Client Secret
- In your Meta App's left sidebar, expand the Settings menu and select Basic
- In the App Secret field, click Show then copy and paste it in the Client Secret field in Botpress
4. Access Token
The Phone Number ID and Access Token are used to send and receive messages to/from the WhatsApp API.
- In your Meta App's left sidebar, expand the WhatsApp menu and select Getting Started
- In the Temporary access token section, click Copy and then paste it in the Access Token field in Botpress
5. (Optional): Permanent Access Token
Permanent Access Token can be used to send and receive messages to/from the WhatsApp API without the need to refresh the token every 24 hours.
- Navigate to Business Settings.
- Choose the business account associated with your app.
- Click on
Add
underSystem Users
. - Enter a name for the system user, assign the
Admin
role, and clickCreate System User
. - Click on
Create Asset
and selectApps
from the asset type Tab. - Select your app and toggle
Manage App (full control)
. - Click
Generate New Token
and selectwhatsapp_business_messaging
andwhatsapp_business_management
permission. - Copy and save your token.
Fix for Unexpected Messaging Behavior
Experiencing replies from the wrong numbers? Disable the advanced permission for
whatsapp_business_management
. This adjustment is crucial because advanced permissions can interfere with how messages are routed, leading to responses from multiple numbers instead of the intended one. Reverting to basic permission settings ensures messages are directed correctly, solving this issue.
Finalizing Channel Configuration
The next step is to Enable the channel from the top of the screen and then copy the webhook URL from the button below the webhook URL.
In the last step, click Save.
Now we can go back to Step (3) & Step (4) in this article.
Webhook Fields
We need to subscribe to the webhook fields below
- Messages: For the chat to work properly, you need to subscribe to the messages webhook field.
Updated 3 months ago