Skip to main content
文档指南WhatsApp

WhatsApp 商业 API

连接到官方 Meta WhatsApp Business API 以发送个性化营销活动、自动化对话并大规模管理客户参与度。

先决条件

BeeCastly 帐户(免费套餐)
元商业帐户 (business.facebook.com)
经过验证的公司电话号码(WhatsApp 上尚未提供)
在 Meta Business Manager 中完成业务验证

设置指南

1在 BeeCastly 中连接 WhatsApp

在 BeeCastly 仪表板中导航至设置 → 集成 → WhatsApp
点击“连接 WhatsApp Business API”。 您将被重定向到 Meta 的嵌入式注册流程。
按照提示选择您的 Meta Business 帐户和电话号码。
连接后,您的 WhatsApp Business 帐户 ID、电话号码 ID 和访问令牌将自动配置。

2创建消息模板

WhatsApp 需要预先批准的出站消息模板(您无法在 24 小时窗口之外发送自由格式的消息)。
转至营销活动 → 模板,然后点击“创建模板”
选择一个类别:营销实用程序身份验证
使用以下变量编写模板 {{1}}{{2}} 用于个性化。
提交元审核。 批准通常需要 1-24 小时。

3发送广播活动

转到广告系列 → 广播 → 创建
选择 WhatsApp 作为渠道。
选择您批准的模板和受众(联系人、标签或细分)。
将模板变量映射到联系人字段(姓名、电话、自定义字段)。
预览消息,然后点击立即发送安排

4管理对话

所有传入的 WhatsApp 消息都会显示在消息 → WhatsApp 中。
直接从收件箱回复客户 - 在 24 小时内,您可以发送自由格式的消息。
启用AI 自动回复,让您的 AI 机器人自动处理常见查询。
将对话分配给团队成员进行手动处理。

最佳实践

维持高质量评级

避免垃圾邮件,保持较高的邮件质量评级。 如果用户阻止您或举报消息,Meta 可能会限制您的发送限制。

获得选择加入同意

在发送营销信息之前始终获得明确的选择加入。 使用表格、网站小部件或亲自收集同意书。

明智地使用人工智能自动回复

当您使用相关知识库文章训练您的机器人时,人工智能自动回复效果最佳。 始终为客户提供联系人工代理的方式。

重要提示:24 小时消息传递窗口

WhatsApp Business API 有 24 小时消息传递窗口。 您只能在客户发出最后一条消息后 24 小时内发送自由格式的消息。 在此窗口之外,您必须使用批准的模板。

API Examples

Use the BeeCastly REST API to send WhatsApp messages programmatically.

bash
curl -X POST https://api.beecastly.com/api/whatsapp/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1234567890",
    "message": "Hello from BeeCastly!"
  }
javascript·send-message.js
const response = await fetch('https://api.beecastly.com/api/whatsapp/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    phone: '+1234567890',
    message: 'Hello from BeeCastly!',
  }),
});

const data = await response.json();
console.log(data);

Troubleshooting

Template not approved

If your template is rejected by Meta, check that it follows WhatsApp's guidelines: no promotional content in utility templates, proper formatting, and clear call-to-action buttons.

Messages not delivering

Ensure the recipient has opted in to receive messages. Check your WhatsApp Business Account health status in the Meta Business Manager.

Rate limits

WhatsApp Cloud API has rate limits. Start with small batches and scale gradually. Use the BeeCastly campaign scheduler to manage sending rates.

Frequently Asked Questions

How long does Meta verification take?
Meta Business verification typically takes 2-5 business days. Ensure your business documents are clear and match your Business Manager details.
Can I use my personal WhatsApp number?
No, you need a dedicated WhatsApp Business API number. This cannot be a personal WhatsApp or WhatsApp Business App number.
What is the cost per message?
WhatsApp charges per conversation (24-hour window), not per message. The first message in a conversation is charged; all subsequent messages within 24 hours are free.