fb_pixel

Webhook receiver Python 3.7

Development | Programming languages
Description
Who make a Webhook receiver in Python 3?
Attachments
No attachments
Info
Description
Code: receiver.py
from flask import Flask, request, abort
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
    if request.method == 'POST':
        print(request.json)
        return '', 200
    else:
        abort(400)
if __name__ == '__main__':
    app.run()

Start up Postman, and do New Request, POST, URL is http://127.0.0.1:5000/webhook, in Body select "raw" and JSON, and put this in: {"id" : "1123"} and his SEND, and the webhook receiver will print {'id': '1123'}.


on February 08th, 2019 (8:59 pm)
All coments
Postman link please..
on February 08th, 2019 (9:03 pm)

Awesome! Very responsive and got the job done quick and correct



on February 08th, 2019 (9:06 pm)
Mark
Head
autor-image
Mark
:)
on February 15th, 2019 (3:48 pm)