r_sk
Webhook Issue - Getting 503 Error
I have been working with the WhatsApp Business API and set up a webhook using a Flask server to receive user message events. Everything was working fine in my local development environment. However, when I deployed my code on Railways, I started encountering a 503 error, and it seems like the requests are not reaching my server.
I have prior experience with Railways, and this is the first time I have encountered this problem.
1. I have confirmed that the webhook URL in my WhatsApp Business API settings points to the correct Railways deployment URL.
2. I have checked for any logs or error messages in the Railways dashboard, but there doesn't seem to be any relevant information.
3. I have also tested the webhook with ngrok locally, and it works without any issues.
main.py
@app.route('/catalyst', methods=['POST', 'GET'])
def process():
data = request.json
response_data = {'success': True}
# print(data)
executor.submit(async_task, data)
return jsonify(response_data), 200
if __name__ == '__main__':
from waitress import serve
serve(app)
#app.run(debug=True, port=4000)
88 replies