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

Enable Manual Configuration

  1. Go to the Integration Hub in Botpress Cloud (if you don't have the integration installed yet).
  2. Find and open the WhatsApp integration then click on the "Install to Bot" button, now go back to your bot.
  3. 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

  1. In your Meta App's left sidebar, expand the WhatsApp menu and select Getting Started
  2. 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

  1. In your Meta App's left sidebar, expand the Settings menu and select Basic
  2. 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.

  1. In your Meta App's left sidebar, expand the WhatsApp menu and select Getting Started
  2. 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.

  1. Navigate to Business Settings.
  2. Choose the business account associated with your app.
  3. Click on Add under System Users.
  4. Enter a name for the system user, assign the Admin role, and click Create System User.
  5. Click on Create Asset and select Apps from the asset type Tab.
  6. Select your app and toggle Manage App (full control).
  7. Click Generate New Token and select whatsapp_business_messaging and whatsapp_business_management permission.
  8. 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.