WhatsApp Setup

Add a bot to WhatsApp using the official integration.

The official WhatsApp integration allows your users to chat with your bot by messaging a WhatsApp number.

Setup

    In Botpress Studio, select Explore Hub in the upper-right corner.

    Search for the WhatsApp integration, then select Install Integration.

    In the Configuration menu, select Authorize WhatsApp.

    Follow the instructions to connect Botpress to your WhatsApp account.

    For advanced use cases, you can use your own Meta app with our integration.

    Step 1: Install the integration in Botpress

    In Botpress Studio, select Explore Hub in the upper-right corner.
    Search for the WhatsApp integration, then select Install Integration.
    In the Configuration menu, open the drop-down menu and select Manual Configuration.

    Step 2: Configure the integration

    Next, fill in the integration’s configuration fields using information from your Meta app:

    Verify Token

    Used by Meta to verify that you’re the real owner of the provided webhook. Can be any alphanumeric string.

    Access Token

    In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize.

    Select a WhatsApp business portfolio (if you haven’t already).

    Go to API testing.

    Select Generate access token, then copy the token.

    In Botpress, paste the token into the integration’s Access Token configuration field.

    Client Secret

    In your Meta App’s left sidebar, expand the App Settings menu and select Basic.
    In the App Secret field, select Show, then copy your secret.
    In Botpress, paste the secret into the integration’s Client Secret configuration field.

    Default Bot Phone Number ID

    In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize.

    Select a WhatsApp business portfolio (if you haven’t already).

    Go to API testing.

    Under Select a ‘From’ phone number, copy the Phone number ID.

    In Botpress, paste the ID into the integration’s Default Bot Phone Number ID configuration field.

    WABA ID (WhatsApp Business Account ID)

    In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize.

    Select a WhatsApp business portfolio (if you haven’t already).

    Go to API testing.

    Under Select a ‘From’ phone number, copy the WhatsApp Business Account ID.

    In Botpress, paste the ID into the integration’s WhatsApp Business Account ID configuration field.

    When you’ve filled in all the fields, select Save Configuration. This will automatically enable your integration.

    Step 3: Add your webhook

    Now that you’ve enabled your integration, you can add your webhook to your Meta app’s configuration:

    In Botpress, copy the webhook URL and Verify Token from the integration’s Configuration section.

    In your Meta app’s left sidebar, go to Use cases > Connect with customers through WhatsApp > Customize.

    Select a WhatsApp business portfolio (if you haven’t already).

    Go to Configuration.
    Paste the webhook URL into the Callback URL field.
    Paste your Verify Token in the Verify Token field.

    Select Verify and save. Then, subscribe to the following webhook fields:

    • message_template_components_update
    • message_template_quality_update
    • message_template_status_update
    • messages
    • template_category_update

    If you want to test your bot’s behaviour in WhatsApp before going through the actual setup process, you can use the WhatsApp integration playground.

    In Botpress Studio, select Explore Hub in the upper-right corner.
    Search for the WhatsApp integration, then select Install Integration.
    Select Test your agent on WhatsApp.
    Follow the instructions to set up the playground.

    Cards


    Triggers


    Troubleshooting

    Not receiving messages from bot on WhatsApp

    Until Meta has verified your business, your bot won’t be able to send messages to WhatsApp users, even if you’ve configured it correctly.

    If you need to test out your bot right away, you can use the WhatsApp Playground while waiting for business verification.

    Meta business verification taking too long

    Unfortunately, we can’t help speed up Meta’s business verification process.

    If you need to test out your bot right away, you can use the WhatsApp Playground while waiting for business verification.

    Bot receiving WhatsApp messages, but not sending messages back

    There may be a problem with the payment method in your WhatsApp business account. Check the billing hub and make sure your payment method is configured correctly.