Google Classroom Integration

Auto-upload the artifact to Drive, attach it to the right assignment, and click Turn In — all from a single Telegram confirmation.

1. OAuth setup

You'll need a Google Cloud OAuth client with the Classroom and Drive scopes enabled. The wizard walks you through it:

bash
studentsync onboard --google
  • Create an OAuth 2.0 Client ID of type Desktop app.
  • Download the credentials.json when prompted.
  • Scopes enabled:
bash
https://www.googleapis.com/auth/classroom.courses.readonly
https://www.googleapis.com/auth/classroom.coursework.me
https://www.googleapis.com/auth/classroom.coursework.students
https://www.googleapis.com/auth/drive.file

2. Submission flow

After Scuba generates the artifact:

  • Pulls your enrolled courses and sends them as inline buttons.
  • Once you tap a course, fetches its pending assignments.
  • You pick the assignment; Scuba previews the PDF.
  • On confirm, it uploads to Drive, attaches to the submission, and calls modifyAttachments + turnIn.
bash
# the user experience
you → /submit
bot → Courses: [CS2003] [MA2002] [HS1001]
you → tap CS2003
bot → Assignments: [Lab 04 · due 23:59] [Lab 05 · due Fri]
you → tap Lab 04
bot → preview.pdf attached — Confirm? [Yes] [Edit]
you → Yes
bot → ✓ turned in at 23:41 IST

3. Late submissions

Classroom accepts late submissions when the teacher has enabled them. Scuba surfaces the late-window status in the confirmation card so you know what you're sending.

Per-student submission only

The Classroom API allows only the student themself to turnIn. Scuba uses yourOAuth token — it can't submit for a classmate.

Troubleshooting

  • 403 insufficient permission: you missed a scope. Re-run studentsync onboard --google and re-consent.
  • Course doesn't show up: you need to accept the course invite in the Classroom UI at least once.
  • Assignment is greyed out:it's already turned in. Use /unsubmit from Scuba to reclaim it (if the teacher allows).