Samfredoly commited on
Commit
fa11f14
·
verified ·
1 Parent(s): 04dab42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -29,8 +29,8 @@ SMTP_PASSWORD = os.getenv("SMTP_PASSWORD", "password")
29
 
30
  # WhatsApp webhook configuration
31
  WHATSAPP_WEBHOOK_TOKEN = os.getenv("WHATSAPP_WEBHOOK_TOKEN", "your_webhook_token")
32
- # Add a default phone number ID from the environment
33
  WHATSAPP_PHONE_NUMBER_ID = os.getenv("WHATSAPP_PHONE_NUMBER_ID", "default_phone_number_id")
 
34
 
35
  # Authentication Credentials for SMTP server
36
  VALID_USERS = {
@@ -213,6 +213,7 @@ def webhook():
213
  response_msg = ("Error processing message. Please ensure the format is: "
214
  "'send email to <recipient> subject <subject> body <body>'.")
215
 
 
216
  return jsonify({"status": "success", "message": response_msg}), 200
217
 
218
  def run_flask_app():
 
29
 
30
  # WhatsApp webhook configuration
31
  WHATSAPP_WEBHOOK_TOKEN = os.getenv("WHATSAPP_WEBHOOK_TOKEN", "your_webhook_token")
 
32
  WHATSAPP_PHONE_NUMBER_ID = os.getenv("WHATSAPP_PHONE_NUMBER_ID", "default_phone_number_id")
33
+ META_ACCESS_TOKEN = os.getenv("META_ACCESS_TOKEN", "default_meta_access_token") # For outgoing WhatsApp API calls
34
 
35
  # Authentication Credentials for SMTP server
36
  VALID_USERS = {
 
213
  response_msg = ("Error processing message. Please ensure the format is: "
214
  "'send email to <recipient> subject <subject> body <body>'.")
215
 
216
+ # If you need to send a response back to WhatsApp via the API, use META_ACCESS_TOKEN in the request header.
217
  return jsonify({"status": "success", "message": response_msg}), 200
218
 
219
  def run_flask_app():