I Want to validate my Webhook in zoom , but it failed

I want to validate my Zoom Webhook in my django project, but it fails with my domain but when i use ngrok on same project then it works fine and validated successfully, i dont know what’s an issue, becuase project is same and also the endpoint is same for both but validation is failed when i use domain , my domain is also registered in cloudfair
’ def handle_zoom_url_validation(self, payload):
“”“Handle Zoom CRC (Certificate of Completion) validation”“”
logger.info(“:green_circle: Handling URL validation request”)
plain_token = payload.get(“payload”, {}).get(“plainToken”)

    if not plain_token:
        logger.error("🔴 Missing plainToken in CRC payload")
        return JsonResponse({"error": "Missing plainToken"}, status=400)

    try:
        # Convert secret to bytes if needed
        secret = settings.ZOOM_WEBHOOK_SECRET
        if isinstance(secret, str):
            secret = secret.encode()
            
        encrypted_token = hmac.new(
            secret,
            plain_token.encode(),
            hashlib.sha256
        ).hexdigest()

        logger.info(f"🟢 Generated encrypted token for CRC: {encrypted_token}")
        return JsonResponse({
            "plainToken": plain_token,
            "encryptedToken": encrypted_token
        }, status=200)

    except Exception as e:
        logger.exception(f"🔥 CRC token encryption failed: {e}")
        return JsonResponse({"error": "Token encryption failed"}, status=500)

1 Like

Hi @Axya
I just tagged you in another thread from a developer who was having an issue validating their endpoint.