WhatsApp Integration
A guide to send and receive messages from your Libraria Chatbot using WhatsApp
Step 1: Set Up a WhatsApp Business Account
- Sign up for a WhatsApp Business Account.
- Verify your phone number by receiving a verification code via SMS or a phone call.
- Complete the setup by providing the necessary business details.
Step 2: Setup Your App in Meta
-
Create your app here.
-
For
What do you want your app to do?
SelectOther
- For
App Type
, selectNone
-
Select your Business Account that you created in
Step 1
-
Head over to your app and add the WhatsApp and Webhook products. Look for
Whatsapp
and clickSet Up
- On the sidebar, navigate to
Whatsapp
>API setup
- The phone number under
From
will be number the users will be messaging your chatbot on whatsapp. Save theWhatsApp Business Account ID
. You will need to paste it later in the Libraria WhatsApp Integration setup.
WhatsApp Business Account ID
Step 3: Create a permanent 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 (opens in a new tab)
- Choose the business account associated with your app.
- Click on
Add under System 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.
Add assets
- Select your app and toggle
Manage App
(full control).
Click on "Manage App"
- Click
Generate New Token
- For
Token Expiration
, selectNever
- For
Available Permissions
selectwhatsapp_business_messaging
andwhatsapp_business_management
.
- For
- Copy and save your token on Libraria and edit your
Permanent Token
on Libraria.
Step 4: Add the WhatsApp Chat Integration in your Libraria Account
- Click settings under your desired library
On the sidebar select your Library and click "Settings"
- Navigate to integrations and click WhatsApp
Select Whatsapp
-
Paste your previously saved
WhatsApp Business Account ID
andPermanent Token
-
Copy the webhook URL and Token
Step 5: Setting up your Webhook Endpoint
-
Head back to your Meta Developer Account and select your app.
-
Go to WhatsApp -> Configuration and click ‘Edit’
-
Paste your webhook URL and Token from Libraria here.
-
After successfuly saving your URL and token, click “Manage” on webhook fields and subscribe to “messages”.
Congratulations, you have successfully setup your WhatsApp Integration.
Official Meta documentation can be found here