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,