Configura tu API de WhatsApp
Este agente usa la WhatsApp Cloud API oficial de Meta. No hay QR: la autenticación es por token permanente.
Variables de entorno
- ✓
META_ACCESS_TOKEN - ✓
META_PHONE_NUMBER_ID - ✓
META_APP_SECRET - ✓
META_VERIFY_TOKEN
Definí estas variables en .env.local y reiniciá el servidor.
Configuración del webhook
Callback URL/api/webhook
Verify Token (META_VERIFY_TOKEN)el valor de tu .env.local
Pasos
- Creá una app en developers.facebook.com.
- Agregá el producto WhatsApp.
- Copiá el Phone Number ID, WABA ID y App Secret.
- Generá un System User Token permanente (los de test duran 24h).
- Configurá el webhook con la Callback URL de arriba y tu META_VERIFY_TOKEN.
- Suscribí el webhook al campo
messages.
En local necesitás exponer el puerto por HTTPS: ngrok http 3000. Ver el README.