Send WhatsApp Message
Introduction
WhatsApp is one of the most popular messaging applications worldwide, with over 2 billion active users. It enables real-time communication through text messages, voice calls, video calls, and multimedia sharing. Businesses use WhatsApp to engage with customers efficiently, offering services such as customer support, notifications, and marketing campaigns.
Potential Users for WhatsApp Broadcast Messages
WhatsApp broadcast messages allow businesses to send messages to multiple recipients at once. However, recipients must have saved the sender’s phone number in their contacts to receive these messages. This feature is ideal for:
Customer engagement and retention
Promotional offers and marketing campaigns
Appointment reminders and notifications
Automated customer support responses
Advantages of WhatsApp Over SMS
Compared to traditional SMS, WhatsApp provides several benefits:
Rich Media Support: Send images, videos, documents, and voice messages.
Read Receipts: Track message delivery and read status.
Two-Way Communication: Unlike SMS, WhatsApp supports interactive conversations.
End-to-End Encryption: Ensures secure messaging.
Cost-Effective: WhatsApp messages are sent over the internet, reducing SMS costs.
Integration
The diagram illustrates the architecture of a messaging system integrating a merchant's services with WhatsApp through DOKU Message Service and Meta's platform. Below is a detailed explanation of the components and their interactions:
Merchant:
The merchant represents a business or service provider that needs to send messages to customers through WhatsApp.
It communicates with the DOKU Message Service to send messages.
DOKU Message Service:
Acts as an intermediary between the merchant and Meta (the company behind WhatsApp).
Handles message processing and transmission from the merchant to WhatsApp via Meta.
It also allows Merchant Admin to create message templates.
Merchant Admin & Web App:
The Merchant Admin can create message templates using a Web App.
The templates are likely predefined message formats required by WhatsApp for business messaging.
Meta (Facebook/WhatsApp API):
Meta's servers act as a gateway for messages sent via WhatsApp.
The DOKU Message Service communicates with Meta’s API to ensure messages reach the correct recipients.
WhatsApp Channel:
Messages processed by Meta are sent to end-users through WhatsApp.
Messages can be received on different platforms, including Android phones, iPhones, and Computers.
Process Flow:
The Merchant sends a message request to the DOKU Message Service.
The DOKU Message Service forwards the request to Meta.
Meta processes the message and delivers it via WhatsApp Channel (Android, iPhone, or Computer).
Meanwhile, the Merchant Admin can create or manage message templates through a Web App.
This architecture enables businesses to automate and streamline customer communication via WhatsApp, ensuring efficient and structured messaging.
API Specification
Header
Client-Id
This is a unique ID used for identification with an API.
Request-Timestamp
It refers to UTC time in epoch format (in milliseconds). Epoch time is calculated as the number of milliseconds since January 1, 1970, at 00:00:00 UTC. Example: 1672531199000.
Request-Id
It is a unique identifier used to track every request sent to the API. This identifier is useful for debugging and log tracking, especially when issues arise.
Signature
End Point
Method:
POST
Content-Type:
application/json
Body Request Parameters
1
templateId
AN
10
The unique identifier for the message template being used. This ID specifies the predefined format and content of the message.
2
params
AN (Array)
-
A list of values that will be dynamically inserted into the template's placeholders. These values personalize the message content.
3
destinationPhone
N
20
The recipient's phone number, formatted as a string. This specifies where the message will be sent..
Example
Response
Success
Fail
Rate Limits
Maximum 100 requests per minute.
Notes
Ensure your WhatsApp Business API is properly configured.
Templates must be pre-approved by WhatsApp before use.
Last updated
Was this helpful?