WhatsApp API from Facebook (Meta)

WhatsApp API from Facebook (Meta)

To integrate WhatsApp API (Cloud API) into DigifyCRM or any other platform, you need to follow these steps through the Facebook Developers platform. This guide will walk you through setting up WhatsApp Cloud API via Meta for Developers.


Step 1: Create a Facebook Developer Account

If you don’t have a Facebook Developer account, you’ll need to create one.

  1. Go to the Facebook Developer Page:

Login to Your Facebook Account:

  • Log in with your Facebook credentials or create a new Facebook account if you don’t have one.

Create a Developer Account:

  • If this is your first time, follow the instructions to set up your Developer Account.


Step 2: Create a New App in Meta for Developers

  1. Navigate to My Apps:

  • On the Facebook Developer Dashboard, click My Apps in the top-right corner.

Create a New App:

  • Click Create App.

  • Choose Business as the app type and click Next.

Enter App Details:

  • Provide a name for your app (e.g., “WhatsApp API Integration”).

  • Add your email address for app contact.

  • Under Business Manager Account, choose your business (if applicable) or skip this step.

Click Create App:

  • Once you’ve filled out the details, click Create App.


Step 3: Add WhatsApp to Your App

  1. Select WhatsApp from the Products Menu:

  • After creating your app, you’ll be taken to the App Dashboard.

  • Scroll down to the Add Product section and find WhatsApp. Click Set Up.

Access the WhatsApp Business API:

  • You will be redirected to the WhatsApp product page within your app.

  • Click Get Started to configure the WhatsApp Business API.


Step 4: Create a WhatsApp Business Account

  1. Connect a Business Account:

  • If you don’t already have a WhatsApp Business Account, you’ll be prompted to create one.

  • Click Create under WhatsApp Business Account (WABA).

  • Fill in your business information (Business Name, Time Zone, etc.).

  • Once you create the account, it will be linked to your app.

Verify Your Business:

  • To unlock the full WhatsApp API features, Meta will require your business to be verified. Follow the business verification process through the Business Manager settings (you’ll need to submit documents like business registration).


Step 5: Add a WhatsApp Phone Number

  1. Add a Phone Number:

  • Once your business account is set up, you’ll be prompted to add a phone number to your WhatsApp Business API account.

  • Click Add Phone Number and enter the number you want to use for WhatsApp communications.

Verify the Phone Number:

  • After entering the phone number, WhatsApp will send a verification code to the number.

  • Enter the code to verify the number.


Step 6: Generate an API Key (Access Token)

  1. Get the API Key:

  • Navigate to the Settings section of your WhatsApp product.

  • Click Generate API Token.

  • This API token is what you will use to integrate WhatsApp with DigifyCRM or any other platform.

  • Important: Store this API token securely as it will be required for authenticating API requests.


Step 7: Configure Webhooks for Incoming Messages

  1. Set Up Webhooks:

  • Webhooks allow WhatsApp to send notifications for new messages or events.

  • In the WhatsApp API Settings section, configure webhooks by providing a callback URL (your application endpoint) and select the message event types (messages, status updates).

Verify Webhook Configuration:

  • Once set, Facebook will send a test notification to your webhook URL for verification.


Step 8: Use the WhatsApp Cloud API

Now that your WhatsApp API is set up, you can use the Cloud API to start sending messages, managing conversations, and integrating with systems like DigifyCRM.

  1. Use the Graph API Explorer:

  • Go to the Graph API Explorer, and select your app.

  • Choose WhatsApp Business from the drop-down menu and test your API by sending messages, checking account status, etc.

Start Making API Calls:

  • You can now use your generated API token to send requests such as sending messages, retrieving message status, and more using WhatsApp Cloud API. Reference the WhatsApp Business API Documentation for further guidance on specific API calls.


Step 9: Submit Templates for Approval (Optional)

To send templated messages (for transactional use cases like order updates or appointment reminders), you’ll need to create and submit templates for approval.

  1. Navigate to the Templates Section:

  • Go to the Message Templates section under your WhatsApp Business Account in Business Manager.

Create New Templates:

  • Create message templates with variables (e.g., {customer_name}).

  • Submit the template for Meta’s review.

Use Approved Templates:

  • Once approved, you can use these templates in your marketing campaigns or customer communications.


Step 10: Integrate WhatsApp API with DigifyCRM

Now that you have your API key and phone number set up, you can proceed to integrate WhatsApp API into DigifyCRM.

  1. Go to DigifyCRM > Settings > WhatsApp Integration.

  2. Enter API Token and Phone Number:

  • Use the API token generated in Step 6 and the verified WhatsApp phone number.

Save and Test:

Test the integration by sending a WhatsApp message through DigifyCRM to ensure it’s working properly.

Did you find this article useful?