Knowledge Base

    How to deploy Livechat on Whatsapp?

    ZA

    Vikas Singh

    8 min read

    Published on May 16 2023 | Last updated on Aug 21 2023

    Before You Start, make sure that you have the prerequisites to get started.

    1. A Phone Number that is not yet linked to any whatsapp Account. 
        You can get your own number from TwillioExotelMessagebird, etc.

    2. A Facebook Account. 

      To start, let's break down the steps you need to take to deploy your Livechat on WhatsApp:

    1. Step 1 -  Creating an App through facebook Meta Developer Account.

    2. Step 2 -  Setting up your Whatsapp Account.

    3. Step 3 -  Registering the Phone Number for sending messages.

    4. Step 4 -  Generating phone number ID and Whatsapp business account ID.

    5. Step 5 -  Configuring whatsapp webhook endpoint for your app.

    6. Step 6 -  Generating permanent token for your app.

    7. Step 7 -  Adding assets and their permissions.


    Now, let's take a closer look at each of these steps:



    Step 1 -  Creating an App through facebook Meta Developer Account

    Go to https://developers.facebook.com

    Log in using your own Facebook account or Facebook business account. If you don’t have an existing account you can create one using the green button as shown in the screenshot below.

    Create an app for your Business account by clicking on “Get Started” button or if you have existing app then click on My Apps.


    Click on “Create App” to start the process of creating an app.

    Select "Others" as the use case you will use for your app.

                Select the app type and click on next button.

            



    Step 2 -  Setting up your Whatsapp Account

    In this section, you will need to select the product that you want to be related to your app. Scroll down to whatsapp and click on setup.




    After clicking on setup, a whatsapp section will be created on the left panel and you will need to create or select a Meta Business Account. Once you have selected a Meta Business Account, click on the “Continue” button.




    Step 3 -  Registering the Phone Number for sending messages.

    You will need to add a Permanent Phone Number to start sending messages on any whatsapp Number. To do this, simply click on Add phone Number as illustrated in the screenshot below.



    Once you click on Add phone Number, you will need to fill in required details to create your whatsapp business profile. Use the display name guidelines to learn more about Display name guidelines for your phone number. This is the name that will show for your business number once approved.

     



    Enter the phone number in this next pop-up and choose your preferred method to verify the number.



    Once verified, the phone number will appear in the form drop down menu of the Send and receive messages section of the panel. 

    Now, you will need to add payment method to be able to send messages through API. You can check out the pricing at whatsapp Business Conversation Pricing.





    Step 4 -  Generating phone number ID and Whatsapp business account ID


    After you have successfully created a Meta business Account you will be redirected to “Getting started” section where you can find “Phone Number ID” and “Whatsapp Business Account ID”.



    Now, copy the Phone Number ID and Whatsapp Business Account ID and paste it into your Livechat screen for whatsapp deployment.



    Step 5 - Configuring whatsapp webhook endpoint for your app.

    You will need to go to the Configuration section in the left panel under whatsapp to add the token and callback URL to configure the webhook endpoint for your app.

    Callback URL: https://us-central1-livechat-production.cloudfunctions.net/whatsapp/webhook

    Verify Token: Appypie_Livechat

    Click on “Verify and Save” to successfully save the “Callback URL” and “Verify Token”




    Navigate to the webhooks section in the left panel above whatsapp and select “Whatsapp Business Account” from the dropdown. Sometimes it asks you to verify the callback URL and Verify Token before you can edit subscription. Enter the same Callback URL and Token provided earlier and click on verify and save.

    Now, Subscribe to messages in this section. You will get a pop-up alert that “you successfully subscribed to messages”.



    After the the above process is completed, you will need to create a permanent token for your App. Follow the steps below to create a permanent token.

    Step 6 -  Generating permanent token for your app.

    Click on “My Apps” in the top header section and then got to your app that you have created and click on the Business hyperlinked text.



    After clicking on the Business hyperlinked text, you will be redirected to the business settings page of your app. Now, navigate to system users in user section on left panel and create a System user if you haven’t created already and assign him the system user role of “Admin”.



    Note: The maximum number of admin system user that you could have is 1.

    Now, you will need to add assets to your admin user. Select Asset type as “Apps” and select the name of the app in the next field. In the last field (App), activate the trigger for “Manage App” so admin can manage roles, change app settings, test the app and view analytics. 

    Click on “Save Changes” button to save the changes that you made.


    Step 7 - Adding assets and their permissions.


    To add an asset click on “Add Assets” button, a pop-up will appear to assign assets to your app.


    Here, you will need to select an Apps then select the app that you and toggle on the button in third section under Full control and then click on save changes.




    After you have successfully added the assets, you will need to generate the permanent token by clicking on the “Generate token” button and selecting the app for which you want to generate the token for. 



    After selecting the app, You will require to choose the length of time for token expiration where you will need to select Permanent.  Now, you will need to scroll down to “Available Permissions” and click on the check box next to whatsapp_business_messaging and whatsapp_business_management. Now, click on generate token.



    You will get a popup stating that an “An access token has been generated for Test Business as following” before clicking on “OK” button make sure to “Copy and save” this token as it won't be stored at Facebook.



    Paste this token into the requested field on Appy Pie whatsapp Deployment screen and click on enable to activate the whatsapp deployment. 



    You have now successfully deployed your Livechat on whatsapp. 

    If you face any issues while deploying, email to us on [email protected] and we will be more than happy to assist you in deploying the Livechat on whatsapp.

    loading...

    loading...

    loading...

    Still can’t find an answer?

    Send us a ticket and we will get back to you.