Automate Your Customer Messaging with High-Speed WhatsApp REST API
Connect your WhatsApp numbers in seconds with dynamic QR code pairing. Send transactional alerts, OTP codes, and order confirmations via high-speed REST API, and handle customer replies instantly with real-time webhooks.
Why Modern Businesses Choose Darory WhatsApp Gateway
Traditional SMS messaging is expensive, suffers from poor open rates, and is frequently blocked by spam filters. Meanwhile, manual WhatsApp web messaging is slow, labor-intensive, and prone to account bans. The official Meta Cloud API imposes rigid template restrictions, long approval delays, and hefty per-conversation charges.
Darory WhatsApp API Gateway delivers the ideal solution: an agile, developer-friendly REST API that connects to your existing WhatsApp numbers in seconds via QR code. Send flexible dynamic messages, verify active phone numbers before sending, receive incoming replies automatically through webhooks, and manage everything effortlessly from your Darory Client Area.
Darory Gateway Specs
RESTful Engine ArchitectureComplete WhatsApp Automation Features Built for Scale
Explore the full feature stack powering the Darory WhatsApp Gateway in your client portal.
1. Dedicated Multi-Instance Sessions
WaInstance CoreEvery account operates inside an isolated WhatsApp session with its own API token, connection state, and phone number pairing.
2. Instant QR Code Pairing with Brand Logo
POST /qrScan and connect within seconds without waiting for lengthy enterprise account verifications.
3. High-Speed RESTful Messaging Engine
POST /send-messageA clean, intuitive HTTP JSON API designed for speed, reliability, and high throughput.
4. Number Registration Verification API
POST /is-registered-userCheck if a telephone number exists on WhatsApp before sending to prevent delivery errors.
5. Inbound Webhooks & Automated Bot Hooks
Event: messageTurn your WhatsApp numbers into a two-way interactive communication channel.
6. Contact Profiles & Privacy Management
Sessions & ContactsManage customer avatars and conversation history programmatically.
Built-in MCP Server: Let Your AI Assistant Use WhatsApp
Every Darory WhatsApp instance comes with a Model Context Protocol (MCP) server included at no extra cost. Connect it to Claude, ChatGPT, Cursor, VS Code Copilot, or any MCP-compatible AI agent and it can work with your WhatsApp number directly.
No glue code, no custom integration: point your AI client at the MCP endpoint, add your API token and x-instance-id, and the assistant gets ready-made WhatsApp tools.
End-to-End Enterprise Architecture Flow
From your application backend to the customer's WhatsApp inbox in milliseconds.
Your App / ERP
Your server (Laravel, Node.js, Python, or WooCommerce) makes an HTTPS POST request to our REST API endpoint.
Auth & Validation
Darory Gateway verifies your Bearer token and targets your isolated WhatsApp session using x-instance-id.
WhatsApp Network
The message packet is securely dispatched through your authenticated phone session to the official WhatsApp network.
Customer & Webhooks
Customer receives the message within 1.5s. When they reply, our webhook simulator delivers the event back to your server.
Full WhatsApp Management Directly Inside Darory Client Portal
As a Darory client, your WhatsApp service comes with an enterprise dashboard designed for seamless operations.
Live Instance Health & Badges
View total instances, active connections, and configured webhooks with real-time operational status indicators.
Token Security & 1-Click Copy
Toggle token visibility, copy secret tokens instantly, or regenerate API tokens on the fly with automatic confirmation.
Built-In Interactive Testing Tool
Dispatch live test WhatsApp messages to any mobile number directly from the dashboard to verify API connectivity.
Webhook Manager & Account Scaling
Create and configure webhook URLs per instance, or request additional WhatsApp accounts via 1-click tickets.
Developer-Friendly Integration in Any Language
Start sending messages with 4 lines of code. Copy tested code snippets for cURL, PHP/Laravel, Node.js, and Python.
curl -X POST https://wa.darory.com/wa-api/send-message \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "x-instance-id: 3" \
-d '{
"number": "201000000000",
"message": "Hello from Darory WhatsApp API Gateway!"
}'
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . config('services.whatsapp.token'),
'x-instance-id' => config('services.whatsapp.instance_id'),
'Content-Type' => 'application/json',
])->post('https://wa.darory.com/wa-api/send-message', [
'number' => '201000000000',
'message' => 'Your OTP verification code is: 489230',
]);
if ($response->successful()) {
return $response->json();
}
const axios = require('axios');
async function sendWhatsAppAlert(phoneNumber, text) {
const { data } = await axios.post(
'https://wa.darory.com/wa-api/send-message',
{
number: phoneNumber,
message: text,
},
{
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'x-instance-id': '3',
'Content-Type': 'application/json',
},
}
);
return data;
}
import requests
url = "https://wa.darory.com/wa-api/send-message"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"x-instance-id": "3",
"Content-Type": "application/json"
}
payload = {
"number": "201000000000",
"message": "Order #4892 confirmed! Track your shipment now."
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> sendWhatsAppMessage() async {
final url = Uri.parse('https://wa.darory.com/wa-api/send-message');
final response = await http.post(
url,
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'x-instance-id': '3',
'Content-Type': 'application/json',
},
body: jsonEncode({
'number': '201000000000',
'message': 'Your verification OTP code is: 954120',
}),
);
print('Status: ${response.statusCode}, Body: ${response.body}');
}
{
"event": "message",
"instanceId": "3",
"data": {
"message": {
"id": {
"fromMe": false,
"remote": "201000000000@c.us",
"id": "A1B2C3D4E5F6"
},
"body": "I need help with my order",
"from": "201000000000@c.us",
"timestamp": 1710000000,
"hasMedia": false
}
}
}
Integrate WhatsApp into Your PHP or Laravel App in 3 Minutes
Skip the HTTP plumbing. Install our open-source package with Composer, add two lines to your .env, and send your first message with a single line of code.
composer require darory/whatsapp
DARORY_WA_TOKEN=your-api-token
DARORY_WA_INSTANCE_ID=12
use Darory\WhatsApp\Laravel\Facades\WhatsApp;
// Text
WhatsApp::sendMessage('201012345678', 'Your order #1042 has shipped 🚚');
// Files: a path, a URL or contents in memory
WhatsApp::sendDocument('201012345678', storage_path('invoices/1042.pdf'), 'Your invoice');
WhatsApp::sendImage('201012345678', 'https://example.com/offer.jpg', 'This week only');
WhatsApp::sendVoiceNote('201012345678', storage_path('voice/welcome.ogg'));
// Check a number before sending
if (WhatsApp::isRegistered($customer->phone)) {
WhatsApp::sendMessage($customer->phone, 'Welcome aboard!');
}
// Another number, or one per customer in a SaaS
WhatsApp::instance('sales')->sendMessage($lead->phone, 'Thanks for your interest!');
WhatsApp::using($tenant->wa_token, $tenant->wa_instance_id)->sendMessage($phone, $text);
use Darory\WhatsApp\Laravel\Notifications\WhatsAppMessage;
use Darory\WhatsApp\Media;
class InvoicePaid extends Notification implements ShouldQueue
{
public function via(object $notifiable): array
{
return ['mail', 'whatsapp'];
}
public function toWhatsApp(object $notifiable): WhatsAppMessage
{
return WhatsAppMessage::create("Hi {$notifiable->name}, we received your payment.")
->media(Media::fromPath($this->invoice->pdfPath()));
}
}
// On your User model
public function routeNotificationForWhatsApp(): ?string
{
return $this->phone;
}
$user->notify(new InvoicePaid($invoice));
// php artisan darory-whatsapp:check
// prints the webhook URL to add in the Client Area
use Darory\WhatsApp\Laravel\Events\MessageReceived;
use Darory\WhatsApp\Laravel\Facades\WhatsApp;
class AutoReply implements ShouldQueue
{
public function handle(MessageReceived $event): void
{
$message = $event->message;
if ($message->isText() && str_contains($message->body, 'price')) {
WhatsApp::sendMessage($message->from, 'Our price list: https://example.com/prices');
}
}
}
use Darory\WhatsApp\Laravel\Facades\WhatsApp;
public function test_customer_is_told_when_the_order_ships(): void
{
$whatsapp = WhatsApp::fake(); // nothing is really sent
$this->post(route('orders.ship', $order));
$whatsapp->assertSentTo($order->customer->phone);
$whatsapp->assertSentCount(1);
}
require 'vendor/autoload.php';
use Darory\WhatsApp\DaroryWhatsApp;
use Darory\WhatsApp\Exceptions\NumberNotOnWhatsAppException;
$whatsapp = new DaroryWhatsApp('YOUR_API_TOKEN', 12);
try {
$sent = $whatsapp->sendMessage('201012345678', 'Hello from PHP!');
echo $sent->id();
} catch (NumberNotOnWhatsAppException $e) {
echo 'This number has no WhatsApp account.';
}
Darory WhatsApp Gateway vs Other Approaches
See why businesses choose Darory instead of manual phone operations or rigid Meta Cloud APIs.
| Feature / Capability | Personal WhatsApp / Web | Official Meta Cloud API | Darory WhatsApp Gateway |
|---|---|---|---|
| Onboarding Speed | Instant (1 phone) | 2-4 weeks (Business Manager & documents) | Instant QR code scan (Under 1 minute) |
| Template Requirements | None (manual typing) | Mandatory pre-approved templates | Free dynamic text, links & custom emojis |
| Automated REST API | Not available | Complex Graph API with expiration tokens | Clean RESTful JSON API with static tokens |
| Real-Time Webhooks | No | Complex webhook verification setup | Turnkey HTTP POST webhooks with typing sim |
| Number Verification Pre-flight | No | Incur charges to discover non-users | Instant check via /is-registered-user |
| Client Portal & Testing Tool | None | Clunky Meta Developer Console | Interactive Darory Client Portal |
Tailored Solutions for Every Business Workflow
From online stores to hospitals and corporate ERPs, automate touchpoints where your customers actually read them.
E-Commerce & Order Tracking
Send instant order confirmations, tracking numbers, shipping milestone alerts, and abandoned cart recovery links with 98% open rates.
OTP Verification & Secure 2FA
Deliver one-time login passwords and account verification codes in under 2 seconds, avoiding SMS delays and telecommunication carrier costs.
ERP & Invoicing Reminders
Connect directly to your accounting or ERP software to send invoice PDF links, due date reminders, and automated payment receipts.
Customer Support & AI Chatbots
Route incoming customer questions to your helpdesk or AI agents (ChatGPT/Gemini) through webhooks for instant automated 24/7 support.
Frequently Asked Questions About WhatsApp API
Ready to Transform Your Customer Communication on WhatsApp?
Get started with Darory WhatsApp API Gateway today. Request your instance through our client portal and start integrating in minutes.