This tiny flask app is a simple example of how to use Nylas' webhooks feature. This app correctly responds to Nylas' challenge request when you add a webhook url to the developer dashboard. It also verifies any webhook notification POST requests by Nylas and prints out some information about the notification.
ngrok makes it really easy to test callback urls that are running locally on your computer.
Make sure virtualenv is installed. To install it type the following:
pip install virtualenvCreate a virtual env, activate it, and then install python dependencies
virtualenv env
source env/bin/activate
pip install -r requirements.txtFirst, make sure ngrok is running with the same port that the local flask app is running.
ngrok http 1234Next, run the flask app.
./app.pyFollow the instructions that are printed to the console.