This webhook can be accessed on Glitch and re-used ("remixed") to start a new project.
Also check out Scott's introduction video on setting up facebook messenger based on his node.js app. Another useful instruction how to set up your webhook can be found here.
- Python 3.6+
- FastAPI
- Uvicorn
- GET verification of a received challenge
- POST message reponse after validating the signature X-Hub-Signature of the received message
The webhook will return the received variable "challenge" as required by Facebook's instructions to set up a webhook. You will have to add the webhook in your Messenger settings for each App, which you can access on Facebook Developers.
After glueing your app together with a facebook page and this webhook you will be able to focus your pythonista skills on the responses of your virtual alter ego.
This webhook will be used as a contribution for the 2020 Facebook Hackathon Series, Hackathon 3 with the submission deadline as of 7 September 2020. This contribution aims to tickle some strategic points out of the judges and particularly encourages all the smart data scientists out there to focus on their algorithmic models to make a compelling case for a friendly, clever and helpful chatbot.
All feedback is welcome. Hope to hear if you find this contribution useful. The repo is here.
ToDo list:
- Refactored dependency to check signature
- Util function to package outgoing message
- Full testing coverage with test client
- Add response time to logs
- Explain code line by line in Readme



