← 返回
沟通协作 Key

EngageLab WhatsApp Business

Call EngageLab WhatsApp Business REST APIs to send WhatsApp messages (template, text, image, video, audio, document, sticker), manage WABA message templates,...
调用 EngageLab WhatsApp Business REST API 发送 WhatsApp 消息(模板、文本、图片、视频、音频、文档、贴纸),管理 WABA 消息模板,...
devengagelab
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 556
下载
💾 9
安装
1
版本
#latest

概述

EngageLab WhatsApp Business API Skill

This skill enables interaction with the EngageLab WhatsApp Business REST API. As a Meta-authorized WhatsApp Business solution provider, EngageLab connects businesses with over 2 billion WhatsApp users for marketing, notifications, OTP verification, and customer service.

It covers three areas:

  1. Send Messages — Deliver template, text, image, video, audio, document, and sticker messages
  2. Template Management — Create, list, get, update, and delete WABA message templates
  3. Callbacks — Receive message delivery status, user responses, and system notifications

Resources

scripts/

  • whatsapp_client.py — Python client class (EngageLabWhatsApp) wrapping all API endpoints: send_template(), send_text(), send_image(), send_video(), send_audio(), send_document(), send_sticker(), and template CRUD (list_templates(), get_template(), create_template(), update_template(), delete_template()). Handles authentication, request construction, and typed error handling.

references/

  • error-codes.md — Complete error code tables for messaging and template APIs
  • template-api.md — Full template CRUD specs with components object details (header, body, footer, buttons)
  • callback-api.md — Webhook callback events: message status, message response, and system notifications

Authentication

All EngageLab WhatsApp API calls use HTTP Basic Authentication.

  • Base URL: https://wa.api.engagelab.cc
  • Header: Authorization: Basic
  • Content-Type: application/json

The user must provide their dev_key (DevKey) and dev_secret (DevSecret). Encode them as base64("dev_key:dev_secret") and set the Authorization header.

Example (using curl):

curl -X POST https://wa.api.engagelab.cc/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic $(echo -n 'YOUR_DEV_KEY:YOUR_DEV_SECRET' | base64)" \
  -d '{ ... }'

If the user hasn't provided credentials, ask them for their dev_key and dev_secret before generating API calls.

Quick Reference — All Endpoints

OperationMethodPath
-------------------------
Send messagePOST/v1/messages
List templatesGET/v1/templates
Get templateGET/v1/templates/:templateId
Create templatePOST/v1/templates
Update templatePUT/v1/templates/:templateId
Delete templateDELETE/v1/templates/:templateName

Sending Messages

Endpoint: POST /v1/messages

Request Body (Template Message)

{
  "from": "+8613800138000",
  "to": ["00447911123456"],
  "body": {
    "type": "template",
    "template": {
      "name": "code",
      "language": "en",
      "components": [
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "12345" }
          ]
        }
      ]
    }
  },
  "request_id": "my-request-123",
  "custom_args": { "order_id": "ORD-456" }
}

Parameters

FieldTypeRequiredDescription
------------------------------------
fromstringNoSending number with country code. Uses default sending number if omitted
tostring[]YesRecipient WhatsApp phone numbers with country code
bodyobjectYesMessage body — see message types below
request_idstringNoCustom request ID, returned as-is in response and callbacks
custom_argsobjectNoCustom data returned in message status callbacks

Message Types

The body.type field determines the message type. Only template messages can be sent to users proactively. Other types require the user to have replied within the last 24 hours.

TypeDescription24h Window Required
----------------------------------------
templatePre-approved template messageNo
textPlain text (max 4096 chars)Yes
imageImage (JPEG/PNG, max 5MB)Yes
videoVideo (MP4/3GPP, max 16MB)Yes
audioAudio (AAC/MP4/AMR/MPEG/OGG, max 16MB)Yes
documentFile (any MIME type, max 100MB)Yes
stickerSticker (WebP, static 100KB / animated 500KB)Yes

Text Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "text",
    "text": { "body": "Hello, your order has shipped!" }
  }
}

Image Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "image",
    "image": {
      "link": "https://example.com/photo.jpg",
      "caption": "Order confirmation"
    }
  }
}

Video Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "video",
    "video": {
      "link": "https://example.com/demo.mp4",
      "caption": "Product demo"
    }
  }
}

Audio Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "audio",
    "audio": { "link": "https://example.com/voice.mp3" }
  }
}

Document Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "document",
    "document": {
      "link": "https://example.com/invoice.pdf",
      "caption": "Your invoice",
      "filename": "invoice_2024.pdf"
    }
  }
}

Sticker Message

{
  "to": ["8613800138000"],
  "body": {
    "type": "sticker",
    "sticker": { "link": "https://example.com/sticker.webp" }
  }
}

Template Message Components

Template messages use pre-approved WABA templates with variable substitution via components:

{
  "to": ["00447911123456"],
  "body": {
    "type": "template",
    "template": {
      "name": "order_update",
      "language": "en",
      "components": [
        {
          "type": "header",
          "parameters": [
            { "type": "image", "image": { "link": "https://example.com/product.jpg" } }
          ]
        },
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "John" },
            { "type": "text", "text": "ORD-12345" },
            { "type": "currency", "currency": { "fallback_value": "$99.99", "code": "USD", "amount_1000": 99990 } }
          ]
        }
      ]
    }
  }
}

Parameter types: text, currency, date_time, image, video, document. Media types only appear in header components.

Response

Success:

{
  "message_id": "cbggf4if6o9ukqaalfug",
  "request_id": "my-request-123"
}
FieldTypeDescription
--------------------------
message_idstringUnique EngageLab message ID
request_idstringYour custom request ID (if provided)

For error codes, read references/error-codes.md.

Template Management

WhatsApp message templates must be created and approved before use. Templates support HEADER, BODY, FOOTER, and BUTTONS components with variables.

For full request/response details including components object specs, read references/template-api.md.

Quick Summary

List allGET /v1/templates with optional query params: name, language_code, category, status

Get oneGET /v1/templates/:templateId

CreatePOST /v1/templates

{
  "name": "order_confirmation",
  "language": "en",
  "category": "UTILITY",
  "components": [
    { "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped." ,
      "example": { "body_text": [["John", "ORD-123"]] } }
  ]
}

UpdatePUT /v1/templates/:templateId (same body as create)

DeleteDELETE /v1/templates/:templateName (deletes all languages for that name)

Template Categories

CategoryDescription
-----------------------
AUTHENTICATIONVerification codes / OTP
MARKETINGPromotional content
UTILITYService notifications

Template Status Values

StatusDescription
---------------------
APPROVEDAvailable for sending
PENDINGAwaiting review
REJECTEDReview rejected
DISABLEDBanned
IN_APPEALUnder appeal
PAUSEDTemporarily paused

Callbacks

Configure webhook URLs to receive message delivery status, user responses, and system notifications.

For full callback data structures and event types, read references/callback-api.md.

Message Status Events

StatusDescription
---------------------
planScheduled for sending
target_validNumber verified as valid
target_invalidNumber is invalid
sentSuccessfully sent to Meta
deliveredDelivered to user's device
readUser has read the message
sent_failedFailed to send
delivered_failedSent but delivery failed
delivered_timeoutNo delivery confirmation within 5 minutes

User Response Events

EventDescription
--------------------
receivedUser sent a direct message
replyUser replied to your message
orderUser placed an order
deletedUser deleted their message

Generating Code

When the user asks to send WhatsApp messages or manage templates, generate working code. Default to curl unless the user specifies a language. Supported patterns:

  • curl — Shell commands with proper auth header
  • Python — Using requests library (or the bundled whatsapp_client.py)
  • Node.js — Using fetch or axios
  • Java — Using HttpClient
  • Go — Using net/http

Always include the authentication header and proper error handling. Use placeholder values like YOUR_DEV_KEY and YOUR_DEV_SECRET if the user hasn't provided credentials.

Media Format Requirements

TypeFormatsMax Size
-------------------------
ImageJPEG, PNG (no transparent background)5 MB
VideoMP4, 3GPP (H.264 video + AAC audio)16 MB
AudioAAC, MP4, AMR, MPEG, OGG (opus codec)16 MB
DocumentAny MIME type (PDF only for template headers)100 MB
StickerWebPStatic: 100 KB, Animated: 500 KB

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 06:27 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,685
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,433
security-compliance

EngageLab OTP

devengagelab
调用 EngageLab OTP REST API 发送一次性密码(OTP)、验证码、发送自定义消息,并管理跨 SMS、WhatsApp、Email 等渠道的 OTP 模板。
★ 0 📥 602