viaSocket Help
Integration Guides

Getting Started-WhatsApp Business Cloud API


In this guide, users can set up and authenticate the WhatsApp Business Cloud API.

Prerequisite for the connection

  • Developer Meta Application

  • Meta Business Manager with the WhatsApp manager access.


๐Ÿ’ก

If you already have the app created and the webhook subscription for the WhatsApp product is empty, you can skip step 01 below.

STEP-01: Creation of the Meta Application

  1. Create an app in https://developers.facebook.com/apps/

  2. Fill in the details on the App Details

  • App name

  • App contact email

    01-App details.png

  1. Under Use cases, Filter by Business messaging, select Connect with customers with WhatsApp

    02-Usecase.png

  2. Choose a business and in the overview, click on Go to dashboard

    03-Go to Dashboard.png

โš ๏ธ

Complete the app settings, including the Privacy policy URL, Terms of Service URL, App icon, etc.

04-app settings.png

๐Ÿ’ก

If you already have the WhatsApp Manager in the business manager, you can skip step 02 below.

STEP-02: API Setup-Adding Phone Number and Payment Setup

  1. Go to the app https://developers.facebook.com/apps/ and click on Use cases, and click on Customize.

    05-usecase-customise.png
  2. Under API Setup, the user can add a phone number and a payment method

๐Ÿ“Œ

You can use the default number provided by WhatsApp. Adding a payment method is mandatory.

06-API Setup.png

07-Phone and Payment.png


STEP-03: Create a System User and Generate a Permanent Access Token

Below steps to create a permanent token for use across the WhatsApp Business Platform.


  1. Navigate to Business Settings and click System users in the sidebar.

  2. Click the Add+ button in the upper-right corner and follow the prompts to create a new system user.

  3. Select the new system user you created, and click Assign Assets.

    • Select your app and toggle Manage app under Full control.

    • Select your WhatsApp account and toggle Manage WhatsApp Business Accounts under Full control.

    • Click the Assign assets button.

  4. Click Generate token.

    • Follow the prompts to generate your token.

    • Add the following permissions to the token:

      • business_management

      • whatsapp_business_messaging

      • whatsapp_business_management

    • Copy the token and store it in a secure place to be used in the later steps.


STEP-04: App ID, App secret, and Business portfolio ID retrieval for connection

  1. You can find the app's App ID on the Meta Developers Platform. App Settings>Basic> App ID

  2. You can find the app's App secret on the Meta Developers Platform. App Settings>Basic> App secret

08-App Id and App secret.png



3. You will find the Business portfolio ID in Meta Business Manager under business info from here.

09- business portfolio ID.png


STEP-05: Adding a connection in the viaSocket

  1. Go to connection (on the left menu) โ†’ Connect new App button (top right) โ†’ Search WhatsApp Business Cloud โ†’ Select Trigger/Action and proceed Next โ†’ Add the App ID, App Secret, System Access Token, and Business portfolio ID.

    10 App search.png

11-connection details.png
โœ…

After the connection configurations are added, the success pop-up will be visible, where you can add the description of the connection and the connection access level.