Connect Account π β
The first step in creating a WhatsApp bot is to link it to our plugin. Additionally, you must create a WhatsApp Cloud API in order to link your bot. Visit Facebook for Developers to start a new app, then select the page's "My Apps" tab.
A page named "Create an App" with a list of available app types will appear instantly.
Select "Business" as the application type, then press the next button.
Complete the form by entering your basic details:
- Display Name: Provide a display name for your business account.
- App Contact Email: Enter an email address.
- Business Account: Choose a Business account if needed (optional).
Click the "Create App" button.
You will need to enter your Facebook password again in the password area. Click the submit button after entering your password. The product page will load instantly.
You must add a product to the app using the page. Include WhatsApp since you will be developing one for a business account on WhatsApp. Scroll down to find the WhatsApp section and click the "Set up" button.
A page will appear for the next steps. You can add a payment method here, but it can be added later.
Add Phone Number π β
Go to API setup from the left menu and click on the βAdd phone numberβ button to add the phone number for WhatsApp Cloud API.
A modal form will appear. Provide profile information visible to people on WhatsApp:
- WhatsApp Business Profile Display Name: Enter a display name.
- Timezone: Select a timezone.
- Category: Choose a category from the dropdown list.
- Business Description: This field is optional.
Click the next button.
Enter your phone number and choose how you would like to verify itβvia text message or phone call.
After providing your phone number and selecting the verification option, click the next button. Verify your phone number.
Configure Webhook π β
Configure the webhook to receive messages. To do this, go to step 3 from the API setup and click on the "Configure webhooks" link.
A page called "Configuration" will appear. In the webhook section, click the edit button.
Provide the callback URL and verify the token. To get these, go to the Whatsboost plugin's sidebar menu.
Click on the Connect Account sidebar link under the WhatsBoost Menu. The Connect WhatsApp Business page will show the Webhook Callback URL and verify token at the top.
Copy them, then return to Facebook Developer's Configuration page and paste them in the respective fields.
Click the "Verify and Save" button.
Select webhook fields by clicking the Manage button. A modal will appear with some webhook fields. Subscribe to the Message webhook field and click the Done button.
You can subscribe and unsubscribe to other webhook fields as needed.
click the βSave changesβ button.
Enable live mode by clicking on the toggle button.
Return to the API Setup page by clicking on the API Setup menu on the left sidebar.
Collect Access Token π β
Collect a permanent access token to connect your bot. In step 5, click the "See the overview page" button.
You will be directed to the business Facebook site's summary page. Select the Business Settings from the menu on the overview page.
Create a user by selecting System user in the left sidebar of the business setting page. Click on the add button.
Enter the system user name and choose a role (employee or admin). Click the button to create a system user.
After creating a user, add assets by selecting the user and clicking on the Add Assets button.
Select the Apps menu from the Select asset type section of the modal. Choose the app and give full control permission. Click the "Save changes" button.
Generate an access token by clicking on the Generate new token button.
Select the app from the drop-down list in the modal. Choose permissions: Business management, Catalog management, WhatsApp business messaging, and WhatsApp business management. Click the Generate token button.
Copy and save the access token.
Proceed to the dashboard. Click the connect WhatsApp menu in the left sidebar's WhatsApp area. Enter the access token and WhatsApp business account ID.
Go to the Business settings tab to obtain the WhatsApp Business Account ID. Select the WhatsApp account menu in the left sidebar. Copy the WhatsApp Business Account ID.
Enter the WhatsApp business account ID and access token, then click the Connect button.
A success message will appear. π