Chuyển đến nội dung
Skillpedia
Lập trình chung48k · #6173

whatsapp-cloud-api

Skill này làm gì

Công cụ này cho phép bạn tích hợp doanh nghiệp với WhatsApp Business qua API chính thức của Meta. Bạn có thể gửi và nhận tin nhắn, dùng các mẫu tin nhắn đã được duyệt, và tự động hóa việc chăm sóc khách hàng.

Khi nào nên dùng

  • ✓Khi bạn muốn gửi tin nhắn hàng loạt đến khách hàng.
  • ✓Để tạo một chatbot tự động trả lời trên WhatsApp.
  • ✓Để tích hợp WhatsApp với các hệ thống kinh doanh khác.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/whatsapp-cloud-api/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/whatsapp-cloud-api/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để thiết lập WhatsApp Business API để gửi thông báo đơn hàng?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ hoạt động bằng cách kết nối hệ thống của bạn với WhatsApp Business qua API chính thức của Meta. Bạn có thể dùng các ví dụ mã bằng Node.js hoặc Python để gửi và nhận tin nhắn, thiết lập phản hồi tự động và quản lý các mẫu tin nhắn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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']}"}
        )

…
Câu hỏi thường gặp

Tôi có phải trả tiền để dùng WhatsApp Business API không?

Tài khoản Meta Business Suite là miễn phí. Tuy nhiên, Meta tính phí theo từng tin nhắn gửi đi, với giá khác nhau tùy loại tin nhắn (marketing, tiện ích, xác thực) và việc phản hồi có nằm trong cửa sổ 24 giờ hay không.

‘Templates’ (mẫu) tin nhắn là gì?

Đó là các tin nhắn được Meta phê duyệt trước, bạn có thể dùng để bắt đầu cuộc trò chuyện với khách hàng hoặc gửi tin nhắn ngoài cửa sổ 24 giờ sau lần tương tác cuối của khách hàng.

Làm sao để thiết lập từ đầu?

Bạn cần tạo tài khoản Meta Business Suite, một ứng dụng trên Meta for Developers, xác minh số điện thoại và lấy access token. Có một hướng dẫn chi tiết để hỗ trợ quá trình này.

Chi tiết

Mô tả gốc của tác giả

Integracao com WhatsApp Business Cloud API (Meta). Mensagens, templates, webhooks HMAC-SHA256, automacao de atendimento. Boilerplates Node.js e Python.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#6173
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự