Flowti Docs
Guides

Connection to the WhatsApp Business API

In this guide, we will show you how to connect the WhatsApp Business conversational channel to Flowti, so your agents can manage intelligent conversations for your business.

Prerequisites

  • Managed Facebook or Meta account
  • Developer Registration
  • If you haven't registered yet, visit the developer registration page and follow the instructions.
  • Device with WhatsApp for sending and receiving test messages.

Step 1. Create a new Meta app with WhatsApp.

  • Open the Meta Apps panel to create a new Meta app with the WhatsApp use case.
  • Click Create app.
  • Add the app name and your email address.
  • Select the "Connect with customers via WhatsApp" use case and click Next.
  • Select a commercial portfolio or create one.
  • A list of publishing requirements is displayed there. You might not have any at the moment. Click Next.
  • Confirm your details, use case, and commercial portfolio. Click "Previous" to make changes or "Create app" to complete the app creation process.
Imagen de la guia
Imagen de la guia

After creating the app using the WhatsApp use case, you will be redirected to the Customize Use Case > Connect to WhatsApp > Quick Start page on the dashboard.

Step 2. Start using the API

  • Click the "Start using the API" button to configure the API. To do so, add a phone number and send your first message. You will be redirected to the API configuration page.
  • In the API Setup section, connect your app to a WhatsApp Business account. This connection allows your app to access the WhatsApp Cloud API and send messages on behalf of your business. Select an existing WhatsApp Business account or create a new one:
  • To use an existing account: select the WhatsApp Business account from the drop-down menu.
  • To create a new account: click on Create a WhatsApp Business account and follow the instructions to set up your business profile.
  • Once connected, you will see your WhatsApp Business account identifier in the API configuration panel.
  • Save the identifier to use it in API calls.
  • Generate an access token by clicking the "Generate Access Token" button, select the corresponding WhatsApp account, and complete the steps.
Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia

Note: If you created a new Meta Business Portfolio during app creation, a WhatsApp Business account may have been automatically created for you. Check the connection in the API settings section before proceeding.

Step 3. Configure the Connection in Flowti

  • Go to Flowti and log in with your account; if you don't have one, you can register here.
  • Go to the Connections section and click the New Connection button.
  • Select the WhatsApp Business option and click Next.
  • Click the advanced settings button.
  • Copy and paste the phone number ID obtained in the previous step of the Meta configuration into the phone number ID field; do the same with the generated access token, and click Save.
Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia

Step 4. Webhook Configuration

This is a crucial step for Flowti to receive WhatsApp events.

  • Once you create the connection, you will be redirected to the Flowti connections window, where you can view your connection and its associated details; there, you will see a URL labeled "Webhook" and a token.
  • We will return to the Meta panel and click the Settings button in the left-hand menu.
  • Copy the webhook URL generated in Flowti and paste it into the "Callback URL" field; similarly, copy the connection token provided by Flowti and paste it into the "Verification Token" field, then click the "Verify and Save" button.
  • Copy and paste the phone number ID obtained in the previous step of the Meta configuration into the phone number ID field; do the same with the generated access token, then click Verify and Save.
  • Once the webhook and token are validated, a series of events will be enabled; scroll down the page and select `messages`.
Imagen de la guia
Imagen de la guia
Imagen de la guia

Step 5. Testing the connection.

  • From another device, send a WhatsApp message to the previously configured WhatsApp Business number.
  • You will receive a notification of an incoming message on the Flowti platform.
  • You can click on the notification, or—from the connections module—click the "View connection conversations" button.
  • You will see a panel showing message statuses, where you will find a message with the status "Open" and the phone number of the person who messaged you.
  • Click on the message, and you will be directed to a chat where you can view the conversation content and reply manually.
Imagen de la guia
Imagen de la guia
Imagen de la guia
Note: The previously generated access token has a short expiration time of approximately 24 hours. If you wish to create a permanent access token or one with a longer lifespan, you must log in to Meta Business Suite, navigate to the System Users section, create an admin user, assign your app to them with full control, and generate the token by selecting the messaging permissions.

Here are some additional steps for that.

Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia
Imagen de la guia

On this page

Connection to the WhatsApp Business API | Documentacion Flowti