Google Classroom API
Base path: /api/google
Connects a user’s content to Google Classroom. Courses are read through the user’s linked Google account; the actual assignment hand-off is created through the Modules API.
These endpoints are only available when the deployment configures Google OAuth credentials — see System requirements.
Endpoint
GET /api/google/courses— list the Classroom courses for the authenticated user.- Requires a session and a linked Google account with a stored refresh token.
- Response: an array of Classroom courses.
Re-authentication
When the user has no linked Google account, or the stored Google authorization is no longer valid (expired or revoked), the endpoint responds with 401 and the body { "requiresAuth": true }. Treat this as a signal to send the user back through the Google authorization flow, rather than as a generic error.
Creating assignments
Publishing coursework linked to a module is done through the Modules API — see Assignments:
GET /api/modules/:id/assignments— list a module’s assignments.POST /api/modules/:id/assignments— create an assignment (e.g. Classroom coursework) for the module.