Esta guía te lleva desde el registro hasta tener tu primer flujo activo — conectando WhatsApp y respondiendo mensajes automáticamente por webhook.
Regístrate en zoosial.com, entra a tu Dashboard y genera una key en Configuración → API Keys. Se muestra una sola vez — guárdala. Más detalle en Autenticación.
# Exporta tu API key export SC_API_KEY="sk_live_k9x2mN4pQr..."
Llama a POST /connect/wasender y escanea el QR devuelto con tu WhatsApp. Sin apps de desarrollador de Meta. Sin esperas de revisión. Detalle completo en WhatsApp Business.
# 1. Inicia la conexión, obtén el QR curl -X POST https://zoosial.com/connect/wasender \ -H "Authorization: Bearer $SC_API_KEY" \ -H "Content-Type: application/json" \ -d '{"profileId":"prof_123","phone":"+34600000000"}' # → { "accountId": "acc_456", "qr": "data:image/png;base64,...", "status": "pending" } # 2. Escanea el QR con tu WhatsApp, luego confirma el estado curl https://zoosial.com/accounts/acc_456/wasender/qr \ -H "Authorization: Bearer $SC_API_KEY"
Registra un webhook para recibir mensajes en tiempo real (firmados con HMAC). Cuando llegue uno, respóndelo desde tu endpoint. Detalle completo en Webhooks.
// 1. Registrar webhook (POST /hooks). El "secret" se muestra una sola vez. await fetch("https://zoosial.com/hooks", { method: "POST", headers: { Authorization: `Bearer ${SC_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://mi-app.com/hooks/sc", events: ["message.received"] }) }); // 2. En tu endpoint: verifica X-SocialGate-Signature y responde el mensaje app.post("/hooks/sc", async (req, res) => { const { event, accountId, from, text } = req.body; if (event === "message.received") { await fetch(`https://zoosial.com/accounts/${accountId}/whatsapp/send`, { method: "POST", headers: { Authorization: `Bearer ${SC_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ to: from, text: "¡Gracias por escribirnos! Te respondemos enseguida." }) }); } res.json({ ok: true }); });
GET /accounts/:id/leads (ver Leads & CRM).