Meta WhatsApp Business API
Learn how to send WhatsApp messages via Meta’s official WhatsApp Business API using Comify.
The Meta WhatsApp Business API provider enables you to deliver professional WhatsApp messages to your customers through the Comify Platform. As the official API from the creators of WhatsApp, it provides direct access to WhatsApp’s 2 billion+ user base with enterprise-grade reliability and features.
Getting Started
Implementing the Meta WhatsApp Business API requires four primary steps: creating a Meta Business account, setting up a WhatsApp Business API account, generating API access tokens, and configuring the Meta integration within your Comify platform.
Creating a Meta Business Account
Follow these steps to set up your Meta Business account:
- Visit Meta Business Suite and click “Create Account”.
- Enter your business information and complete the registration process.
- Verify your business email address.
- Once verification is complete, you’ll be directed to your Meta Business dashboard.
Setting Up WhatsApp Business API with Meta
Before generating API access tokens, you’ll need to set up your WhatsApp Business API account:
- In your Meta Business dashboard, navigate to “Business Settings” > “Accounts” > “WhatsApp Accounts”.
- Click “Add” to create a new WhatsApp Business Account (WABA).
- Follow the guided process to connect your business phone number with the WhatsApp Business API.
- Complete the business verification process, which may include providing business documentation.
- Set up your WhatsApp Business profile with your business information, logo, and description.
Business Requirements for WhatsApp Business API
Before proceeding, ensure your business meets these requirements:
- Valid Business Identity: Your business must be officially registered and possess a clear identity that Meta can verify.
- WhatsApp Business Policy Adherence: Ensure your business operations align with WhatsApp’s Business Policy.
- Customer Consent: You must obtain explicit consent from customers before reaching out to them via WhatsApp.
- Dedicated Phone Number: A dedicated phone number that will serve as your business’s WhatsApp identity.
- Business Verification: Your business must complete Meta’s business verification process.
- Payment Method: A valid payment method must be set up in your Business Manager account.
Creating API Access Tokens
Follow these steps to generate and secure your WhatsApp API access tokens:
- Go to the Meta Developers Portal and create a business app if you don’t have one.
- In your app’s dashboard, add the “WhatsApp Business API” product.
- Navigate to “WhatsApp” > “API Setup” and follow the steps to configure your app.
- You’ll need to generate a System User access token or a Business Integration System User access token:
- System User Access Token: For developers accessing their own business data
- Business Integration System User Access Token: For tech providers accessing customer data
- Ensure your tokens have the following permissions:
whatsapp_business_management
whatsapp_business_messaging
business_management
- Copy the generated token immediately and store it in a secure location.
- Note: Access tokens are app and user-specific. Never share the token or post it publicly.
Creating a Comify API Key
Before configuring the Meta WhatsApp integration, you’ll need to generate a Comify API key for authentication:
- Access your Comify account dashboard.
- Navigate to the API Keys management section at https://cloud.comify.io/settings/api-keys.
- Select “Generate API Key” if not already generated.
- Provide a clear, descriptive name for your key (e.g., “Meta WhatsApp Integration”) to facilitate future management.
- Copy and store this API key in a secure location. You’ll use this key in your application code to authenticate requests to the Comify platform.
Configuring Meta WhatsApp Integration in Comify
To establish the connection between Comify and Meta’s WhatsApp Business API:
- Sign in to your Comify platform dashboard.
- Navigate to Integration Store > Add Integration > WhatsApp.
- From the available WhatsApp service providers, select Meta.
- Enter the WhatsApp API access token you generated earlier.
- Provide your WhatsApp Business Account ID (found in your Meta Business Manager).
- Configure any additional provider-specific settings according to your requirements.
- Click Save to finalize the integration.
Creating WhatsApp Message Templates
After successfully configuring the Meta WhatsApp integration, you’ll need to create and get approval for WhatsApp message templates:
- Navigate to the Manage Templates section in your Comify dashboard.
- Select the
WhatsApp
tab from the available channel options. - Click
Create Template
to begin the design process. - Choose from multiple template creation methods:
- Pre-approved Templates: Select from WhatsApp’s pre-approved template categories.
- Custom Templates: Create your own template following WhatsApp’s guidelines.
- AI-Assisted Design: Utilize the
AI Writer
feature for automated content generation that follows WhatsApp’s guidelines.
- Add variables to personalize your templates where needed (e.g., customer name, order number).
- Submit your template for WhatsApp approval (this may take 24-48 hours).
Understanding WhatsApp Message Types
WhatsApp Business API supports several types of messages:
- Session Messages: Responses to customer-initiated conversations (24-hour window).
- Template Messages: Pre-approved message templates for business-initiated conversations.
- Interactive Messages: Messages with buttons, list messages, or reply buttons.
- Media Messages: Images, documents, videos, and other rich media content.
- Authentication Templates: One-time passwords or verification codes.
Sending WhatsApp Templates
Implement the following code examples in your application to trigger WhatsApp template delivery:
Upon successful API request processing, you will receive a response containing a unique requestId and confirmation message:
Important: The API may return a success response even when there are underlying issues with your request. For comprehensive delivery monitoring and troubleshooting, we recommend reviewing the complete request logs in the Activity Feed dashboard.