🟢Ноw to connect WhatsApp Bot
To connect WhatsApp Bot, you need to have a Facebook business account. Authorize in it. On https://developers.facebook.com go to My Apps section and click Create.
Select Other
On the next page select Business
Next, add your Application Name, email, select or create a business manager.
On the next page, find the WhatsApp and click Set up.
Next, select the Business profile.
Next, click Start Using the API.
You need to add the phone number from which you want to send messages to WhatsApp.
You can write a test phone number and check the sending of the message.
Phone number ID, WhatsApp Business account ID are also listed on this page. These data are needed to connect WhatsApp Bot in loyaltydigital.cards account.
Next, we configure the webhooks.
Click Callback URL - Edit
Fill in: Callback URL: https://mailing.digitalwallet.cards/whatsapp/webhook/inbound
Verify token: whatsapp_bot_webhook_verify_token
Click Verify and save.
Next, select Webhooks - Manage
Find Messages in the list and enable it. Click Done
The next step is to configure the permanent token. You can find more information at https://developers.facebook.com/docs/whatsapp/business-management-api/get-started#1--acquire-an-access-token-using-a-system-user-or-facebook-login.
To do this, you need to select a business manager: go to https://business.facebook.com/settings/people.
Select the Business Manager you specified in the settings earlier.
Go to Users -> System Users and click Add (create a user: enter a name and select the Admin role).
Next, click Generate new token, select our application, select Token expiration "Never", enable:
- business_management
- catalog_management
- whatsapp_business_management
- whatsapp_business_messaging
Click Generate token. Save the generated token.
You also need to go to Assign assets -> Apps and enable Manage app.
Go back to the business account dashboard and enable Live mode. You can also save the data on the screenshot to connect the WhatsApp bot.
Now connect WhatsApp Bot in your loyaltydigital.cards account.
Click Connect account for WhatsApp Bot section, enter the token you saved above, sender's phone number, Phone number ID, WhatsApp Business account ID.