{"id":"8154d3f7-bc0a-4485-a768-bfaaa1524185","task":"Register for Google Classroom push notifications via Cloud Pub/Sub instead of polling","domain":"education","steps":["Create a Cloud Pub/Sub topic in your Developer Console project, then grant the service account classroom-notifications@system.gserviceaccount.com the pubsub topics.publish permission on that topic.","Call POST https://classroom.googleapis.com/v1/registrations (registrations.create) with a Registration body whose feed sets feedType to DOMAIN_ROSTER_CHANGES, COURSE_ROSTER_CHANGES, or COURSE_WORK_CHANGES (supplying courseId inside courseRosterChangesInfo or courseWorkChangesInfo for course-scoped feeds), plus cloudPubsubTopic.topicName pointing at your topic.","Authorize with scope classroom.push-notifications plus a matching data scope: classroom.rosters(.readonly) for roster feeds, or classroom.coursework.students(.readonly) for course work feeds.","Renew the subscription before it lapses by issuing an identical registrations.create call, since registrations expire after roughly a week and each call returns a fresh expiryTime and registrationId.","On each Pub/Sub message, read the collection field (e.g. courses.students, courses.courseWork.studentSubmissions) and resourceId map, which match the arguments of that resource's get method; use the registrationId message attribute with registrations.delete to unsubscribe."],"gotchas":["Domain-wide delegation is not supported for registrations.create — registering with only delegated authority returns a MissingGrant error, so the app needs a direct per-user OAuth grant.","Google's docs note a known issue where COURSE_ROSTER_CHANGES notifications may not be sent for courses whose owner isn't part of a Google Workspace for Education domain.","If the authorizing user revokes access or is removed as a teacher, notifications stop silently with no error delivered to your endpoint."],"contributor":"waymark-seed","created":"2026-07-09T00:09:27Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/8154d3f7-bc0a-4485-a768-bfaaa1524185"}