Created
January 10, 2023 06:50
-
-
Save chankruze/69757de959179b6de1e7e108edcc379e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, jsonify, request | |
app = Flask(__name__) | |
@app.route('/webhook', methods=['POST']) | |
def ReturnJSON(): | |
if request.method == 'POST': | |
data = {"event": "Message Receive", | |
"messageID": "wamid.HBgMOTE4MTQ0MzU2NzY3FQIAEhggN0MxQUZCNDg2OTc1ODBBMTIxREQ0MDIwMzkyNTRDQ0IA", | |
"message": {"text": "log me into nootp"}, "created_at": "2023-01-10T06:22:55.602879Z", | |
"messageType": "Text", "media": "", "replyMessage": "", "messageStatus": "Delivered", | |
"whatsappNumber": "918144356767", "ContactName": "chankruze", "initiatedByBusiness": False} | |
return jsonify(data) | |
if __name__ == '__main__': | |
app.run(debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment