raghavNCI
commited on
Commit
·
de0e189
1
Parent(s):
9f70f32
wa fix 1
Browse files- routes/wa_gateway.py +2 -2
routes/wa_gateway.py
CHANGED
@@ -15,7 +15,7 @@ PHONE_NUMBER_ID = os.getenv("WHATSAPP_PHONE_NUMBER_ID")
|
|
15 |
RECIPIENT_NUMBER = "+353 89 949 5777" # or pass dynamically
|
16 |
|
17 |
def send_preferences_flow(to):
|
18 |
-
url = f"https://graph.facebook.com/
|
19 |
headers = {
|
20 |
"Authorization": f"Bearer {ACCESS_TOKEN}",
|
21 |
"Content-Type": "application/json"
|
@@ -80,7 +80,7 @@ async def receive_whatsapp_event(request: Request):
|
|
80 |
print(f"[INFO] Message from {from_number}: {text}")
|
81 |
|
82 |
response = send_preferences_flow(from_number)
|
83 |
-
|
84 |
if response["status"] == "failed":
|
85 |
print("[ERROR] Failed to send interactive message:", response["error"])
|
86 |
|
|
|
15 |
RECIPIENT_NUMBER = "+353 89 949 5777" # or pass dynamically
|
16 |
|
17 |
def send_preferences_flow(to):
|
18 |
+
url = f"https://graph.facebook.com/v22.0/714483311743364/messages"
|
19 |
headers = {
|
20 |
"Authorization": f"Bearer {ACCESS_TOKEN}",
|
21 |
"Content-Type": "application/json"
|
|
|
80 |
print(f"[INFO] Message from {from_number}: {text}")
|
81 |
|
82 |
response = send_preferences_flow(from_number)
|
83 |
+
|
84 |
if response["status"] == "failed":
|
85 |
print("[ERROR] Failed to send interactive message:", response["error"])
|
86 |
|