WhatsApp Business API from Meta
Process to get the WhatsApp Business API directly from Meta
Two get the WhatsApp Business API from Meta, you need to ensure that the following 2 criteria are met;
Facebook Business Manager is verified
You don't have an active WhatsApp account linked with the number
How to get the WhatsApp Business API from Meta?
The process to obtain the WhatsApp Business API from Meta is a bit lengthy and is divided into 4 parts;
Creating an Application on the Meta Developer Portal
Configuring the Phone Number of the Sender
Generating Permanent Token from Meta
Configuring Meta Provider on Swiftsell and setting up the Web-hook URL on Meta
Now let's understand each step in detail;
Creating an Application on the Meta Developer Portal:
To create the application on the Meta Developer Portal, you can follow the following steps;
Go to the website Meta for Developers - https://developers.facebook.com/
Sign in to your account by clicking on 'Log In' & providing your Facebook credentials
After successful login, click on 'My Apps' option in the top right corner
Click on 'Create App'
Choose 'Business' & click on 'Next'
Configure following;
App Name: Based on your preference you can provide an appropriate name to the application like test_app, support_app, etc.
Contact Email: Provide your email address linked with your Facebook account
Business Account: Select the verified business account with which you would like the app to be associated with
Click on 'Create App' to create the app
Under 'Add Products to your App', click on 'Set up' against 'WhatsApp'
Once the app is created for WhatsApp, you will get a temporary token (expires in 23 hours), sender's test number, phone number ID, WhatsApp Business ID & template for testing purpose
Configuring the phone number of the sender:
To link the API & run the bot on your number, you will need to configure your number. You can follow the following steps to configure the same;
Go to 'Getting Started' under 'WhatsApp' on the left panel
Go to 'Step 5: Add a Phone Number' & click on 'Add Phone Number'
Configure the following;
Business Name: Provide the name of your business
Business Website: Provide the website address of your business
Country: Select the country where the business is based in
Click 'Next' to proceed further
Configure the following to set up a WhatsApp Business profile;
WhatsApp Business Profile Display Name: That name will appear to the visitors or customers on WhatsApp
Timezone: The timezone in which your business will be operating in
Category: Choose the category of business from the available options
Business Description: Provide a short description of what the business does. This cannot be more than 512 characters and will be displayed to the visitors or customers
Click 'Next' to proceed further
Verify your phone number using the code received and click 'Next' to configure the phone number
Generating Permanent Token:
The next step and most important step is to generate the permanent token for the API configured with the phone number. You can follow the following steps to generate the permanent token;
Go to business.facebook.com
Go to 'Settings -> Business Settings -> Users -> System Users'
Create a new system user by clicking on 'Add' & configure the following;
System Username: Provide appropriate system username as per our preference like developer_test etc..
System User Role: Select the role of the system user as 'Admin'
Click on 'Create System User' to create the system user
Once the user is created, click on 'Add Assess' under the newly created system user to assign the assets. You need to follow the following steps to assign the assets;
Select 'Apps' as 'Assets Type'
Select the newly created 'App' under 'Select Assets'
Switch on 'Manage App' under 'Full Control' in 'App'
Click on 'Save Changes' to assign assets to the created user
Go to 'Accounts -> WhatsApp Accounts'
Click on 'Add People' & configure the following;
Select the recently created system user under 'Select People'
Switch on 'Manage WhatsApp Account' under 'Assign Access'
Click on 'Assign' to save the changes
Go back to 'Users -> System Users'
Select recently created 'System User'
Click on 'Generate New Token' to create a permanent token
Choose your created 'WhatsApp Business App'
Check the following three permissions;
Token Type: Permanent
Whatsapp_business_management
Whatsapp_business_messaging
Click on 'Generate' again to generate the new token
We at Swiftsell recommend having the token copied and saved offline for easy access in the future
Configure Meta provider on Swiftsell & set up webhook URL on Meta:
Once the permanent token is generated, you can follow the following steps to configure the bot on your WhatsApp Number:
Sign in to 'Swiftsell App' - https://app.swiftsell.biz/
Go to 'Channel Configuration -> WhatsApp -> Configuration'
Click on '+ Configuration'
Configure following;
Phone Number: Enter the phone number with which the APIs are linked along with the country code however without the '+' sign
WhatsApp Business Account ID: Copy the WhatsApp Business Account ID from the App created on the Meta Developer Portal and paste it into the space provided
App ID: Copy the App ID from the App created on the Meta Developer Portal and paste it in the space provided
Phone Number ID: Copy the Phone Number ID from the App created on the Meta Developer Portal and paste it in the space provided
Permanent Token: Copy and paste the permanent token generated for the app into the space provided
Click on 'Save' to save the configuration
Once the configuration is successful, the web-hook URL will be generated by Swiftsell. Copy the 'web-hook' URL
Go back to the App created on the Meta Developer Portal
Go to 'WhatsApp -> Configuration'
Click on 'Edit' against 'Callback URL'
Paste the 'Web-hook URL' generated by Swiftsell along with the 'Permanent Token'
Click on 'Verify & Save'
Click on 'Manage' against 'web-hook fields'
Click on 'Subscribe' against 'Messages'
Click 'Done' to activate the API on WhatsApp
Once you have completed these steps, you should be able to see the bot active on WhatsApp number and able to exchange messages with the bot on WhatsApp
Last updated