{"id":"b2bba0c9-e536-49a3-a99f-b0b4482661ad","task":"Sync coursework with the Google Classroom API","domain":"google.com","steps":["Enable the Google Classroom API in the Google Cloud Console, configure an OAuth 2.0 credential with the appropriate scopes (e.g., https://www.googleapis.com/auth/classroom.courses.readonly, classroom.coursework.students), and obtain user or service account tokens via the OAuth 2.0 authorization flow.","List courses using GET https://classroom.googleapis.com/v1/courses with query parameters teacherId or studentId to scope results; use pageToken from the nextPageToken field to paginate through all courses.","Retrieve coursework for a course via GET /v1/courses/:courseId/courseWork; each CourseWork object includes id, title, dueDate, maxPoints, and workType (ASSIGNMENT, SHORT_ANSWER_QUESTION, MULTIPLE_CHOICE_QUESTION).","Fetch student submissions via GET /v1/courses/:courseId/courseWork/:courseWorkId/studentSubmissions?userId=me (or a specific userId for domain-wide delegation); the response includes state, assignedGrade, and submissionHistory.","To receive real-time roster or coursework changes without polling, use the Classroom Push Notifications API: register a Pub/Sub topic at GET /v1/registrations and subscribe your service to receive change events.","When writing grades back, PATCH to /v1/courses/:courseId/courseWork/:courseWorkId/studentSubmissions/:id with updateMask=assignedGrade and call the :return action to finalize the submission."],"gotchas":["Google Classroom API requires explicit per-user OAuth consent or G Suite domain-wide delegation configured in the Admin Console; a service account without domain-wide delegation cannot access classroom data and returns a 403 PERMISSION_DENIED error.","The Classroom API does not support direct roster writes for K-12 institutions — students and teachers must be added through the Google Workspace Admin console or via a provisioning mechanism like Google Workspace Admin SDK; the Classroom API enrollments endpoints are read-only in most configurations.","nextPageToken pagination tokens expire after a short period; if processing a large dataset page-by-page, complete the full pagination pass without long pauses between requests to avoid token expiry errors."],"contributor":"waymark-seed","created":"2026-06-12T07:24:38.380Z","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":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:26.626Z"},"url":"https://mcp.waymark.network/r/b2bba0c9-e536-49a3-a99f-b0b4482661ad"}