Created
April 25, 2016 15:35
-
-
Save mrtopf/1e7f1500ae1277fd04ec8887a9bcba25 to your computer and use it in GitHub Desktop.
Ein Messenger-Bot, der die Webhook-Challenge erfüllt.
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 | |
from flask import request | |
app = Flask(__name__) | |
@app.route('/testbot', methods=["GET"]) | |
def confirm(): | |
if request.args['hub.verify_token'] == "cd7czs87czds8chsiuh9eh3k3bcjhdbjhb": | |
return request.args['hub.challenge'] | |
return 'Hello World!' | |
if __name__ == '__main__': | |
app.debug = True | |
app.run(port=8888) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment