---
title: "Handle Google Calendar push notifications"
method: POST
path: "/webhooks/google-calendar"
tags: ["Webhooks"]
---

# Handle Google Calendar push notifications

`POST /webhooks/google-calendar`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/webhooks/google-calendar`
- Auth: none declared

Receives push notifications from Google Calendar when watched events change.
Used for RSVP tracking - when attendees accept/decline calendar invites,
Google sends a notification here, and we update session_attendance records.

**Setup Instructions:**
1. Register your webhook URL with Google (see GOOGLE_CALENDAR_WEBHOOK.md)
2. Set GOOGLE_CALENDAR_WEBHOOK_TOKEN env var for verification
3. Webhook URL must be HTTPS in production

**Headers from Google:**
- X-Goog-Channel-ID: Your channel ID
- X-Goog-Resource-ID: Google's resource ID
- X-Goog-Resource-State: "sync", "exists", or "not_exists"
- X-Goog-Channel-Token: Your verification token
- X-Goog-Resource-URI: URI of changed resource

## Response `200`

Webhook processed

- object
  - `success` boolean
  - `data` object
    - `message` string

## Other responses

- `401`: Invalid webhook token

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
