Getting WhatsApp API (Old approach)
To automate chats on your WhatsApp number, you need to procure a WhatsApp API from Meta or any other BSP.
Here is the process of obtaining a WhatsApp API from Meta:
Step 1: Setting up a Meta (Facebook) Business Account and App
If you already have Facebook Business account, you can skip this step.
Create a Meta (Facebook) business account:
Visit the Meta (Facebook) Business account homepage here
Enter your business name, your name, and work email address. Click 'Next'
Provide your business details and click 'Submit'
Enter your business details and click 'Submit'

Create a new Meta (Facebook) app here:
Log in to your Meta (Facebook) developer account here

Select 'My Apps'

Select 'Create App'

Select user case: 'Other' and click 'Next'

Select app type: 'Business' and click 'Next'

Provide app details: App name, app contact email, business account (optional), and click 'Create App'

Step 2: Setting Up Meta (Facebook) App for WhatsApp Integration
Add WhatsApp to your Meta (Facebook) app:
Choose your app in the developer's dashboard here
Locate 'Add products to your app' in your app's dashboard tab

Select 'WhatsApp' for setup

Select your Meta (Facebook) business account
Navigate to App settings > Basic from the sidebar

Set the Privacy Policy URL to https://ally.io/privacy

Save changes
Set 'App Mode' to Live

Step 3: Generate a Permanent WhatsApp Token
Follow these steps to obtain a permanent WhatsApp Access Token:
Create a 'System user'
Visit the Meta Business Suite here
Locate your business account in the top-left dropdown menu and click 'Settings'
Click 'Business settings'

Go to Users > System users

Add an 'Admin' system user

2. Add assets
After creating the system user, click 'add assets'

Navigate to Apps > "Your app name"
Select your app and grant full control to manage the app

3. Generate system user access tokens
Click 'Generate new token' on the system user

Choose the app that will use the token and set the token expiration to never

Select "whatsapp_business_messaging" and "whatsapp_business_management" permissions

Generate the token
Copy the access token and store it securely

4. Add a new business number for WhatsApp
You can use your own business number or utilize the provided test number for your WhatsApp chatbot
In WhatsApp Developer Dashboard, navigate to WhatsApp > API Setup from the sidebar

Proceed to "Step 5: Add a phone number," click 'Add phone number'

Provide details required in the following form

Verify your number using the received code
Once successfully added, select your phone number in Step 1 of API Setup
Make sure you choose your selected number and not the test number.

5. Add a payment method
To send messages via WhatsApp, you need a valid payment method. Refer here for details
After adding your business phone number, click "Add payment method" to address the "Missing valid payment method" alert

You'll be directed to your WhatsApp account settings. Click 'Payment Methods' then 'Add business payment method' and follow the prompts to add your card info

6. Test your new business number for WhatsApp
Return to WhatsApp developer dashboard, navigate to API Setup > Step 1
Enter a testing 'To' number
Click 'Send message' to verify successful message delivery

Step 4: Configure WhatsApp API on Ally
1. Retrieve WhatsApp account Information
In WhatsApp developer dashboard, navigate to WhatsApp > API Setup
Coy the app ID
Copy the phone number ID
WhatsApp business Account ID

Paste this copied data into Ally's WhatsApp channel configuration screen
Paste the phone number
Paste the permanent token (received from Step 3)

Click 'Save' and you will see a 'Webhook URL' field generated

Step 5: Configure WhatsApp API Webhook Settings
1. Verify WhatsApp webhook callback
In WhatsApp developer dashboard, navigate to 'Configuration'
Under Webhook, click 'Edit'


Click 'Verify and save'
2. Configure Webhook subscription field
Under 'Webhook fields', click 'Manage'

Find the 'Messages' field and subscribe to it by checking the box

Step 6: Activate Your WhatsApp Bot and Test
Make sure the WhatsApp chatbot is deployed and activated
Last deployed would show some recent time
Switch should be turned on

Send a message to the WhatsApp number
On doing this, the the chatbot should respond back
You should be able to see the chat on the live chat screen
Last updated