Google calendar doesn't natively support "real" webhooks. It can only send a notification that a change has happened which can then be used to fetch the changes.
This project acts as a simple proxy that emulates the regular webhook behaviour of sending payload data along with the notification.
Python >= 3.6, sorry :)
.. include:: requirements/base.in :literal:
This is basically taken from the Google calendar push notification documentation_
with some additions learned by painful trial and error
#. Verify ownership of the target domain (i.e. where this service will be
running) in the Google search console.
#. Register the target domain in the Google API console (create a project
first if you don't have one yet)
#. Create oAuth 2.0 client credentials in the Google API console (credentials tab)_
https://<your-domain.name.here>/authorize/2/ in the Authorized redirect URIs fieldClient ID and Client secret.. _Google search console: https://www.google.com/webmasters/tools/home?hl=de
.. _Google calendar push notification documentation: https://developers.google.com/google-apps/calendar/v3/push
.. _Google API console: https://console.developers.google.com/apis/credentials/domainverification
.. _Google API console (credentials tab): https://console.developers.google.com/apis/credentials
The following environment variables are needed:
CLIENT_ID - Google oAuth client id (see above)CLIENT_SECRET - Google oAuth client secret (see above)DOMAIN - Fully qualified domain name the app will be running onSECRET_KEY - Djano SECRET_KEY; can be any string, recommended length: 50 charactersOptional:
EXTERNAL_PORT - external port the docker container is bound to, defaults to 8000The easiest way to set those is to put them in the .env file which will
automatically be picked up by docker-compose.
Steps:
#. Clone repo
#. Run docker-compose build
#. Ensure env variables are set (see above)
#. Run docker-compose up -d
#. Ensure docker-compose ps shows web, worker, scheduler and redis as Up
#. Try connecting to http://localhost:8000_ in your browser
#. Setup forwading proxy
Content type
Image
Digest
Size
296.6 MB
Last updated
over 9 years ago
docker pull ulope/gcal-push-proxy