WhatsApp + Telegram Business API

WhatsApp & TelegramBusiness API for Messaging

Send and receive messages via WhatsApp Business API (Baileys/WhiskeySockets) and Telegram MTProto API through a unified RESTful interface. Includes multi-device management with persistent session handling and automatic reconnection. Full media support — images, videos, audio, and documents.

WhatsApp

Baileys API

WhatsApp Web protocol integration

Telegram

MTProto API

Native Telegram protocol

Multi

Device Support

Multiple devices per account

Media

Full Media Support

Images, video, audio, docs

Business API Endpoints

RESTful API for WhatsApp and Telegram messaging

💚

WhatsApp API

POST /api/tenant/social-api/whatsapp/send
{"to": "8801712345678",
  "message": "Hello from API!",
  "device_id": 1}
POST /api/tenant/social-api/whatsapp/send-media
(multipart/form-data with file)
  • • Send text, image, video, audio, document messages
  • • ╴Multi-device support with session persistence
  • • ╴Automatic reconnection via OTT Worker
🔵

Telegram API

POST /api/tenant/social-api/telegram/send
{"to": "8801712345678",
  "message": "Hello from API!",
  "device_id": 2}
POST /api/tenant/social-api/telegram/send-media
(multipart/form-data with file)
  • • ╴Send via MTProto — higher rate limits
  • • ╴Message any phone number, not just bot users
  • • ╴Full media support: images, video, audio, docs
  • • ╴API ID + Hash authentication from my.telegram.org

Multi-Device Management

Manage unlimited WhatsApp and Telegram devices from one dashboard

Device Connection Benefits

  • Connect multiple WhatsApp and Telegram devices to a single API gateway
  • Each device gets independent session management and status monitoring
  • Automatic session persistence — sessions survive server restarts
  • Round-robin message distribution across multiple devices for higher throughput
  • Real-time connection status monitoring with automatic alerts

Device Configuration

// Device Configuration (per device) { "device_id": "wa_001", "type": "whatsapp", "status": "connected", "last_active": "2025-01-15T10:30:00Z" }

Configure and manage devices from the dashboard or API. Net2APP's OTT Worker maintains persistent WebSocket connections for WhatsApp (Baileys) and MTProto connections for Telegram with automatic reconnection.

💡 Tip: Use multiple devices with round-robin distribution for high-volume messaging while maintaining account health across all connected devices.

Business API Features

Comprehensive WhatsApp and Telegram messaging capabilities

WhatsApp Text Messaging

Send text messages through WhatsApp using the Baileys WhatsApp Web protocol. Supports emoji, formatting, and message queuing.

WhatsApp Media Messages

Send images, videos, audio files, and documents through WhatsApp. Supports thumbnail generation and automatic media processing.

Telegram Text Messaging

Send text messages via Telegram MTProto API with higher rate limits than the Bot API. Message any phone number on Telegram.

Telegram Media Messages

Send images, videos, audio files, and documents through Telegram. Full media type support with automatic compression.

Session Persistence

Persistent device sessions that survive server restarts. Automatic session restoration ensures continuous messaging availability.

Multi-Device Management

Manage unlimited WhatsApp and Telegram devices from a single dashboard. View status, proxy config, and activity logs.

RESTful API Design

Clean HTTP REST API for all messaging operations. Simple authentication with tenant API keys. JSON request/response format.

OTT Worker Processing

Background OTT Worker manages device connections, message queuing, media processing, and automatic reconnection with exponential backoff.

Bulk Message Support

Send messages to multiple recipients in a single API call. Message queuing with rate limiting per device for account safety.

WhatsApp & Telegram API — FAQ

Common questions about the Business API

Do I need a business verification for WhatsApp API?

Net2APP uses the Baileys library which implements the WhatsApp Web protocol — the same method used by WhatsApp Web and the desktop app. You do NOT need WhatsApp Business API approval or a verified business account. Any WhatsApp account can be connected via QR code pairing.

What are the advantages of MTProto over Telegram Bot API?

MTProto (used by the Telegram mobile/desktop app) offers: (1) Higher rate limits — send more messages per second. (2) Message any phone number, not just users who started a chat with a bot. (3) Full media support including all file types. (4) Access to your personal contacts and groups. The Bot API has stricter limits and limited functionality.

Can I use both WhatsApp and Telegram with the same API key?

Yes. The Net2APP Business API uses a single tenant API key for both WhatsApp and Telegram endpoints. You specify the device_id in the API request to select which paired device to send from. This allows unified API integration for both messaging platforms.

How does the OTT Worker maintain connections?

The OTT Worker is a background Node.js process (src/workers/ott-worker.ts) that maintains persistent WebSocket connections for each paired device. It handles: automatic reconnection on disconnection with exponential backoff, session persistence to database, media download for incoming messages, and keep-alive pings to detect connection drops.

Is there a limit on how many messages I can send?

Message rates are limited per device to maintain account health. Default rate limits are configurable from the dashboard. For high-volume WhatsApp messaging, we recommend using multiple paired devices with round-robin message distribution for optimal throughput.

Start Using WhatsApp & Telegram API — Free

Deploy your Business API gateway with WhatsApp and Telegram support. Multi-device management, persistent sessions, and full REST API. No setup fees.

Deploy Your Instance Free →