# 🟢 Ноw to connect WhatsApp Bot

Source: https://help.inwallet.cards/mailings-and-other-services/now-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.

![image.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606737_6a21e711eda6d.png)

Select Other

![image-1.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606776_6a21e7385aa37.png)

On the next page select Business

![image-2.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606792_6a21e7486f24b.png)

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

![image-3.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606828_6a21e76c20710.png)

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

![image-4.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606844_6a21e77c97e06.png)

Next, select the Business profile.

![image-5.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606856_6a21e788d5a5c.png)

Next, click Start Using the API.

![image-6.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606869_6a21e795a985a.png)

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

![image-7.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606882_6a21e7a25b400.png)

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

![image-8.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606944_6a21e7e021b9f.png)

Phone number ID, WhatsApp Business account ID are also listed on this page. These data are needed to connect WhatsApp Bot in [InWallet.Cards](http://InWallet.Cards) account.

![image-9.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606954_6a21e7ea7ff0d.png)

Next, we configure the webhooks.

![image-10.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606964_6a21e7f4b1142.png)

Clicks **Callback URL - Edit**

![image-11.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780606977_6a21e8019f61e.png)

Fill in:  
Callback URL: [**https://mailing.inwallet.cards/whatsapp/webhook/inbound** ](https://mailing.inwallet.cards/whatsapp/webhook/inbound)  
Verify token: **whatsapp\_bot\_webhook\_verify\_token**   
Click Verify and save.

![image-12.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607016_6a21e8281cd1c.png)

Next, select **Webhooks - Manage**

![image-13.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607068_6a21e85c3aa90.png)

Find Messages in the list and enable it. Click Done

![image-14.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607077_6a21e86580258.png)

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 -&gt; System Users** and click **Add** (create a user: enter a name and select the Admin role).

![image-15.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607103_6a21e87fc11a1.png)

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**

![image-16.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607115_6a21e88b46be0.png)

Click Generate token. **Save the generated token.**

You also need to go to **Assign assets -&gt; Apps** and enable **Manage app.**

![image-17.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607136_6a21e8a0af86b.png)

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.

![image-18.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607146_6a21e8aa2699a.png)

Now connect WhatsApp Bot in your [InWallet.Cards](http://InWallet.Cards) account. Go to the mailing list section -&gt; settings <https://app.inwallet.cards/mailings/settings.>

Click connect WhatsApp Bot, enter the token you saved above, sender's phone number, Phone number ID, WhatsApp Business account ID.

![image.jpg](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607165_6a21e8bd00aca.jpg)

✅ **Please note** that this is only for loyalty cards. That is, with sub-accounts, you will not be able to set up communication via WhatsApp.

**How to install a card in WhatsApp**

Scan the QR code of the card from your mobile phone

This opens the card issuing form in your mobile phone. Here, enter the required details in this case first name and phone number then click ‘Install in WhatsApp’

![image-19.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607192_6a21e8d82b4f6.png)

Once the installation is complete and the integration is added to WhatsApp, you will receive a confirmation message indicating that the setup was successful.

![image-20.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607251_6a21e913b66e2.png)

When you click on “Card Info“ this displays the balance, reward, company name, card expiration date, serial number,etc.

![image-21.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607284_6a21e9349eb66.png)

When a customer taps the “QR Code“, it simply opens the QR code in fullscreen so the business can scan it.

![image-20.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607467_6a21e9ebd82bb.png)

If you have other cards installed, tapping “Menu“ gives you the option to choose another card.

![image-23.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607355_6a21e97bcf1f1.png)

You will be presented with a list of all the cards you’ve installed, allowing you to choose any one of them.

![image-24.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607488_6a21ea0017629.png)

Once a card is selected, the system will request the information needed for that specific card.

![image-25.png](https://cdn.eniston.com/bases/2bc24ed3-c0e8-4d51-9bb3-cfa9cdb5b66d/attachments/1780607500_6a21ea0c27c87.png)
