:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(user-interviews): TEMP log raw Vapi webhook body on auth failure (#58749)
Paul D'Ambra488512329434
diff --git a/products/user_interviews/backend/webhooks.py b/products/user_interviews/backend/webhooks.pyindex 96ec097800b8..94f1b23806f2 100644--- a/products/user_interviews/backend/webhooks.py+++ b/products/user_interviews/backend/webhooks.py@@ -302,8 +302,10 @@ def vapi_webhook(request: Request) -> Response:body_bytes=len(request.body),)if not (provided and expected and hmac.compare_digest(provided, expected)):- # Log prefixes (first 8 chars of one-way hashes — safe to log; do not leak secrets) to diagnose- # whether the failure is wrong-secret vs different-body vs case-mismatch.+ # TODO: REMOVE — temporary diagnostic dump of the raw body and the+ # provided signature so we can locally reproduce Vapi's HMAC and find+ # the byte-level mismatch that's causing 100% signature_failed. Safe+ # only because user_interviews is not yet shipped to real users.logger.warning("user_interviews_vapi_webhook_signature_failed",has_provided_signature=bool(provided),@@ -311,6 +313,8 @@ def vapi_webhook(request: Request) -> Response:provided_prefix=provided[:8] if provided else None,provided_length=len(provided) if provided else 0,body_bytes=len(request.body),+ provided_signature=provided,+ raw_body=request.body.decode("utf-8", errors="replace"),)return Response({"error": "invalid signature"}, status=status.HTTP_401_UNAUTHORIZED)