Overview

The Google Classroom API provides a programming interface for software developers, administrators, and school leaders to manage Google Classroom resources. You can build software that creates, retrieves, and modifies Classroom courses and their content.

Some typical use cases include:

  • Managing courses, rosters, and guardians
  • Adding assignments, announcements, and course materials
  • Assigning grades and modifying grading settings
  • Generating data for analysis
  • Making content or tools from an outside provider discoverable and accessible within Classroom

Is the Classroom API the right solution for me?

Google provides several products to help you interact with Classroom. The following are some common scenarios and recommendations for products that might best fit your needs.

Modify Google Classroom resources

Scenario Recommended solutions
I want to regularly manage a high volume of courses, users, or other Classroom resources. I am comfortable writing code and maintaining software infrastructure. Write applications that use Classroom API.
I want to occasionally manage a small volume of Classroom resources. I am comfortable writing small amounts of code with little overhead. Use Classroom API with Google Apps Script.
I want to occasionally make changes to individual Classroom resources. I am comfortable working with terminal commands. Use Google Apps Manager.
I want a large volume of reports with details about events in Classroom. Use BigQuery Data Transfer Service.
I want to conduct an investigation into my users' activity. Generate reports in the Admin console or use the Reports API.

Integrate with Google Classroom

Scenario Recommended solutions
I want teachers and students to see and launch my content in Classroom. Build a Classroom add-on.
I want teachers to click a button on my website or app that embeds my content in Classroom. Build a Classroom add-on and create attachments programmatically.
I want teachers to click a button on my website or app to link to my content in Classroom. Create coursework using Classroom API or embed Share to Classroom buttons.
I want Classroom teachers to sync with or import information from my Student Information System. Implement OneRoster for SIS or create and access resources using Classroom API.

Getting started

New developers are encouraged to do the following before starting a new project:

To begin developing, ensure that you have completed the prerequisite steps. Choose the appropriate Classroom API scopes for your needs, then set up your environment and begin making requests by following one of the quickstarts:

Experiment with the Google APIs Explorer

To experiment calling methods on live data, try using the Google APIs Explorer. You don't have to write any code to get started, but be aware that actions you perform using the APIs Explorer can modify existing data.

One way to start calling the methods is to call the courses.list() method. This method does not require any request parameters and you can retrieve an id from the returned list of courses to use as the request parameter for other API calls. If you don't have any courses, you can create one using the courses.create() method.

You can also explore the Classroom API reference.