Production / WhatsApp Webhook
- Canonical Convex target:
dev:hardy-gopher-480/https://hardy-gopher-480.convex.cloud. - Pre-deploy guard: run
npm run check:convex-deploymentbefore any Convex push. - One-command guarded push:
npm run deploy:convex:hardy. - Convex deployment: The app uses the Convex deployment whose URL is set in
NEXT_PUBLIC_CONVEX_URL(e.g. in Vercel). You must deploy Convex to that deployment after any Convex code or function changes: runnpx convex deploy(for production) or use the same deployment as your dev URL.npx convex devonly pushes to the dev deployment; production must be updated withnpx convex deployor the app may see "Could not find public function" or outdated validators. - Logging policy envs (optional):
CONVEX_LOG_DEBUG=1(non-production only),CONVEX_LOG_INFO_SAMPLED=1,CONVEX_LOG_SAMPLE_RATE=0.01. - Convex (Dashboard → Settings → Environment Variables): Set
WHATSAPP_VERIFY_TOKEN(if not set in Integrations webhook form), andWHATSAPP_APP_SECRET(recommended) to verify POST webhook signature. OptionallyWHATSAPP_ACCESS_TOKEN,WHATSAPP_PHONE_ID,WHATSAPP_WABA_IDwhen not using per-number tokens. - Vercel (recommended): Keep Vercel build as
next buildonly, and runnpx convex deployin a separate authenticated release step targeting the same deployment URL (NEXT_PUBLIC_CONVEX_URL). This avoids build failures likeMissingAccessTokenwhen Vercel tries to deploy Convex without credentials. - Vercel (alternative): If you intentionally run
npx convex deploy --cmd 'next build'during Vercel build, addCONVEX_DEPLOY_KEYin Vercel env vars. See Convex + Vercel docs. - Meta Developer Console: Webhook URL =
https://<deployment>.convex.site/whatsapp/webhook(use your Convex deployment host; replace.convex.cloudwith.convex.sitefromNEXT_PUBLIC_CONVEX_URL). Verify token must match the value in Integrations orWHATSAPP_VERIFY_TOKEN.
Source captured: 2026-10-11