From d9cdddb8c892635cb7c9a0da9d03a2ab2ceb22f8 Mon Sep 17 00:00:00 2001 From: dvirlabs <114520947+dvirlabs@users.noreply.github.com> Date: Wed, 13 May 2026 10:52:30 +0300 Subject: [PATCH] Fix SSL --- backend/whatsapp.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/whatsapp.py b/backend/whatsapp.py index 80ba8bf..fb8b9b4 100644 --- a/backend/whatsapp.py +++ b/backend/whatsapp.py @@ -3,7 +3,6 @@ WhatsApp Cloud API Service Handles sending WhatsApp messages via Meta's API """ import os -import ssl import httpx import certifi import re @@ -167,8 +166,7 @@ class WhatsAppService: url = f"{self.base_url}/{self.phone_number_id}/messages" try: - ssl_ctx = ssl.create_default_context(cafile=certifi.where()) - async with httpx.AsyncClient(verify=ssl_ctx) as client: + async with httpx.AsyncClient(verify=certifi.where()) as client: response = await client.post( url, json=payload, @@ -298,8 +296,7 @@ class WhatsAppService: print("=" * 80 + "\n") try: - ssl_ctx = ssl.create_default_context(cafile=certifi.where()) - async with httpx.AsyncClient(verify=ssl_ctx) as client: + async with httpx.AsyncClient(verify=certifi.where()) as client: response = await client.post( url, json=payload, @@ -548,8 +545,7 @@ class WhatsAppService: url = f"{self.base_url}/{self.phone_number_id}/messages" try: - ssl_ctx = ssl.create_default_context(cafile=certifi.where()) - async with httpx.AsyncClient(verify=ssl_ctx) as client: + async with httpx.AsyncClient(verify=certifi.where()) as client: response = await client.post( url, json=payload,