whatsapp-cloud-api
它能做什么
这个工具可以让你通过 Meta 官方 API,把自己的业务与 WhatsApp Business 集成起来。你可以收发消息、使用预先批准的消息模板,并实现客户服务自动化。
适用场景
- ✓当你想向客户批量发送消息时。
- ✓当你想创建一个在 WhatsApp 上自动回复的聊天机器人时。
- ✓当你想把 WhatsApp 与其他业务系统集成时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/whatsapp-cloud-api/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我应该如何设置 WhatsApp Business API,用来发送订单通知?”
每周 5 个新技能,1 分钟读完。
工作原理
它的原理是通过 Meta 官方 API 把你的系统连接到 WhatsApp Business。你可以使用 Node.js 或 Python 的代码示例来收发消息、设置自动回复,并管理消息模板。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
WhatsApp Cloud API - Integracao Profissional
Overview
Integracao com WhatsApp Business Cloud API (Meta). Mensagens, templates, webhooks HMAC-SHA256, automacao de atendimento. Boilerplates Node.js e Python.
When to Use This Skill
- When the user mentions "whatsapp" or related topics
- When the user mentions "whatsapp business" or related topics
- When the user mentions "api whatsapp" or related topics
- When the user mentions "chatbot whatsapp" or related topics
- When the user mentions "mensagem whatsapp" or related topics
- When the user mentions "template whatsapp" or related topics
Do Not Use This Skill When
- The task is unrelated to whatsapp cloud api
- A simpler, more specific tool can handle the request
- The user needs general-purpose assistance without domain expertise
How It Works
Skill para implementar integracoes profissionais com WhatsApp Business usando a Cloud API oficial da Meta. Suporta Node.js/TypeScript e Python.
Overview
A WhatsApp Cloud API e a API oficial da Meta para envio e recebimento de mensagens via WhatsApp Business. Desde outubro 2025, e a unica opcao suportada (a API On-Premises foi descontinuada).
Versao da API: Graph API v21.0 (2026)
Base URL: https://graph.facebook.com/v21.0/{phone-number-id}/messages
Autenticacao: Bearer Token (System User Token para producao)
Pricing 2026 (por mensagem):
| Categoria | Custo | Quando cobrado |
|---|---|---|
| Marketing | $0.025-$0.1365 | Campanhas, promocoes |
| Utility | $0.004-$0.0456 | Confirmacoes de pedido, atualizacoes |
| Authentication | $0.004-$0.0456 | OTP, reset de senha |
| Service | GRATIS | Resposta dentro da janela de 24h |
Pre-requisitos:
- Conta Meta Business Suite (gratuita)
- App no Meta for Developers com produto WhatsApp
- Numero de telefone verificado
- System User Token (permanente)
Se o usuario nao tem conta Meta Business, leia references/setup-guide.md para o guia completo de setup do zero.
Decision Tree
Use esta arvore para determinar o proximo passo:
O usuario precisa de setup inicial?
├── SIM → Leia references/setup-guide.md
└── NAO → Qual linguagem?
├── Node.js/TypeScript
└── Python
→ O que quer fazer?
├── Enviar mensagens → Secao "Tipos de Mensagem" abaixo
├── Receber mensagens → Secao "Webhooks" abaixo
├── Automatizar atendimento → Secao "Automacao" abaixo
├── WhatsApp Flows / Commerce → Secao "Features Avancados" abaixo
├── Gerenciar templates → references/template-management.md
└── Compliance / limites → Secao "Compliance & Quality" abaixo
Para iniciar um projeto do zero com boilerplate pronto, use o script:
python scripts/setup_project.py --language nodejs --path ./meu-projeto
## Ou
python scripts/setup_project.py --language python --path ./meu-projeto
1. Configurar Variaveis De Ambiente
WHATSAPP_TOKEN=seu_access_token_aqui
PHONE_NUMBER_ID=seu_phone_number_id
WABA_ID=seu_whatsapp_business_account_id
APP_SECRET=seu_app_secret
VERIFY_TOKEN=token_customizado_para_webhook
2. Enviar Mensagem De Texto Simples
Node.js/TypeScript:
import axios from 'axios';
const GRAPH_API = 'https://graph.facebook.com/v21.0';
async function sendText(to: string, message: string) {
const response = await axios.post(
`${GRAPH_API}/${process.env.PHONE_NUMBER_ID}/messages`,
{
messaging_product: 'whatsapp',
to,
type: 'text',
text: { body: message }
},
{ headers: { Authorization: `Bearer ${process.env.WHATSAPP_TOKEN}` } }
);
return response.data; // { messaging_product, contacts, messages: [{ id }] }
}
Python:
import httpx
import os
GRAPH_API = "https://graph.facebook.com/v21.0"
async def send_text(to: str, message: str) -> dict:
async with httpx.AsyncClient() as client:
response = await client.post(
f"{GRAPH_API}/{os.environ['PHONE_NUMBER_ID']}/messages",
json={
"messaging_product": "whatsapp",
"to": to,
"type": "text",
"text": {"body": message}
},
headers={"Authorization": f"Bearer {os.environ['WHATSAPP_TOKEN']}"}
)
…
常见问题
使用 WhatsApp Business API 需要付费吗?
Meta Business Suite 账号是免费的。不过,Meta 会按发送的每条消息收费,价格因消息类型(营销类、服务类、验证类)以及回复是否在 24 小时窗口内而有所不同。
什么是消息“模板”?
模板是 Meta 预先批准的消息,你可以用它主动发起与客户的对话,或在客户最后一次互动的 24 小时窗口之外发送消息。
我该如何从零开始设置?
你需要创建 Meta Business Suite 账号、在 Meta for Developers 上创建应用、验证一个电话号码,并获取访问令牌(access token)。官方有一份详细指南,可以帮你完成这些步骤。
详情
作者的原始描述
Integracao com WhatsApp Business Cloud API (Meta). Mensagens, templates, webhooks HMAC-SHA256, automacao de atendimento. Boilerplates Node.js e Python.
热度
- GitHub 星标
- 48k
- 排名
- #6173
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。