Learn how to easily integrate your chatbot with WhatsApp using ChatBotKit. Our step-by-step guide will show you how to set up your integration and connect with your audience on WhatsApp.

ChatBotKit can easily integrate with the WhatsApp messaging platform. Our platform provides a seamless experience for your users, allowing them to engage with your chatbot directly on WhatsApp. The integration is easy to set up and provides a reliable way to connect with your audience.

Features

The ChatBotKit WhatsApp Integration offers a wide array of features designed to enhance user interaction and data collection:

  • Contact Collection: This feature empowers your bot to gather essential contact information from all users who interact with it. This allows for more personalized interactions and can assist in data-driven decision-making processes.
  • Session Duration: Set custom session durations for each chat session. You can tailor the length of your chat sessions to fit your unique business needs, giving you control over the pace and depth of your customer interactions.
  • File Attachments: All files, pictures, and media uploaded during conversations are securely stored as attachments. You can access these files at any time, making it easy to reference previous conversations and attachments.
  • Vision Models Support: Powerful vision-compatible models can process and analyze visual media like pictures, providing another layer of interaction between the bot and users.
  • Allowed Senders: Restrict which phone numbers can send messages to your bot. This is a powerful security feature that lets you whitelist specific numbers or allow all senders. This helps prevent unauthorized access or spam.
  • Logging & Monitoring: Every event that occurs on WhatsApp is thoroughly logged. These logs are always available for inspection, ensuring transparency and providing a resource for review and analysis when necessary.

Step-by-step Setup Guide

Before you proceed you will need Meta Business account. Depending on your business account status you may also need to setup payment details get a permanent or a test phone number which is required in subsequent steps.

  1. Go to ChatBotKit and create a new WhatsApp Integration.

  2. Type integration name and optional description and press the "Create" button.

  3. Save the "Callback Endpoint" and "Verify Token" for later.

  4. Go to Meta Developer Portal and create a new application.

  5. Select "Other" from the "What do you want your app to do?" screen.

  6. Select "Business" type app from the list of available options.

  7. Name your app, type in your email and select your business account. Click the "Create app" button.

  8. Click the "Setup" button for the WhatsApp Product.

  9. Click the "Webhooks" block form the "Quickstart" screen.

  10. Click the "Edit" button to setup a webhook.

  11. Copy the "Callback Endpoint" and "Verify Token" we saved in step 3 and click on the "Verify and save" button.

  12. Click the "Manage" button.

  13. Select only the "messages" field. Click the "Done" button.

  14. Go to "API Setup" and copy your "Phone number ID". You need to either buy or setup a test phone number if you do not have one already.

  15. Paste the "Phone Number ID" in ChatBotKit and click the "Save" button.

  16. Go to your Meta Business to create a new user if you do not have one already.

  17. Select "System Users" and click on the "Add" button.

  18. Make sure the "System User Role" is set to "Admin".

  19. Click on the "Add Assets" button.

  20. Select the "Apps" type. Select your application from the "Selected assets" list. Finally make sure you select the "Manage app" option under "Full control".

  21. Finally, we need generate a token. Click the "Generate New Token" button.

  22. Select your app from the dropdown list. Make sure you also select bot "whatsapp_business_messaging" and "whatsapp_business_management" options from the permissions list. Finally, click the "Generate Token" button.

  23. Now copy the "Access Token".

  24. Paste the token in your ChatBotKit integration and press the "Save" button.

Congratulations you have completed the 20 step setup guide!

Configuring Integration Settings

After setup, you can customize your WhatsApp integration with additional options:

Allowed Senders

By default, your bot accepts messages from any WhatsApp user (*). If you want to restrict which phone numbers can reach your bot, you can whitelist specific numbers in the Allowed Senders field. This is useful for:

  • Testing: Only allow your own phone number while developing
  • Private bots: Restrict access to a specific group of people
  • Compliance: Control who can initiate conversations with your bot

To enable this:

  1. Go to your WhatsApp integration settings
  2. Scroll to the Allowed Senders field
  3. Enter phone numbers (one per line), using the format +12025551234 or +447911123456
  4. Leave blank or enter * to allow all senders
  5. Save your changes

Session Duration

Control how long your bot keeps a conversation active for a single user. After this period, the next message starts a new conversation. This helps manage context and cost for long-running conversations.

File Attachments

Enable or disable the ability for users to send files, photos, and media to your bot. When enabled, your bot can process and respond to uploaded files.

Chatting with your WhatsApp bot

To start chatting with your WhatsApp bot you need to connect to one of your dedicated or test phone numbers. You can find this information in the API setup settings.

⚠️ WhatsApp Test Phone Numbers

If you are using a test number, make sure that you add your own phone number in the number list otherwise you wont be able to communicate with the test number. To do so navigate to WhatsApp "API Setup" page. Click on the "To" field. Then click on the "Manage phone number list". Add your number. This is an important step if you are using test numbers.

Simply add the number as a contact or type it into the WhatsApp chat search box.

Troubleshooting

Sometimes you may encounter issues with the integration. If your bot is not responding, double-check your setup process and ensure that all the fields were filled in correctly. If the issue persists, please contact our support team for further assistance.

I am not receiving any messages from the WhatsApp bot

If you're not receiving messages from your WhatsApp bot, it may indicate a setup issue. The WhatsApp integration requires careful configuration and attention to details. Here are steps to troubleshoot and ensure your settings are correct:

  • Begin by checking the WhatsApp Integration Events for any clues. These events may not show up instantly, so a lack of events might hint at a setup problem.

  • The integration process is complex, necessitating exact adherence to instructions.

    • Confirm that these have been accurately copied from ChatBotKit to the Meta Developer Portal.
    • Ensure these elements are correctly configured.
  • Be aware that test numbers are limited. They can only be used with phone numbers previously verified in the Meta Developer Portal. To do so navigate to WhatsApp "API Setup" page. Click on the "To" field. Then click on the "Manage phone number list". Add your number. This is an important step if you are using test numbers.