📨MAILINGS

🟢Ноw to connect WhatsApp Bot

7min

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.

Document image


Select Other

Document image


On the next page select Business

Document image


Next, add your Application Name, email, select or create a business manager.

Document image


On the next page, find the WhatsApp and click Set up.

Document image


Next, select the Business profile.

Document image


Next, click Start Using the API.

Document image


You need to add the phone number from which you want to send messages to WhatsApp.

Document image


You can write a test phone number and check the sending of the message.

Document image


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.

Document image


Next, we configure the webhooks.

Document image


Click Callback URL - Edit

Document image


Fill in: Callback URL: https://mailing.digitalwallet.cards/whatsapp/webhook/inbound

Verify token: whatsapp_bot_webhook_verify_token

Click Verify and save.

Document image


Next, select Webhooks - Manage

Document image


Find Messages in the list and enable it. Click Done

Document image


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:

  1. business_management
  2. catalog_management
  3. whatsapp_business_management
  4. whatsapp_business_messaging
Document image


Click Generate token. Save the generated token.

You also need to go to Assign assets -> Apps and enable Manage app.

Document image


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.

Document image


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.

Document image