Frequently Asked Questions

Viewing, creating, and modifying CourseWork in Classroom

What can I build with the CourseWork endpoints in the Classroom API?

The endpoints let developers view and manage work in a class. Specifically, you can do all of the following:

  • View assignments and questions (collectively referred to as CourseWork) for a user
  • Create, modify, and delete CourseWork
  • Attach materials (Drive files, YouTube videos, links) to CourseWork
  • Change the state of a student's submission (such as turn-in, return, reclaim)
  • Set the grade for an assignment submission
  • Attach materials (Drive files, YouTube videos, links) to student submissions

Some sample use cases for CourseWork:

  • Gradebooks, SIS or reporting systems can sync assignments and grades from Classroom to their applications, eliminating manual data transfer
  • Learning applications can create new assignments which appear in the class stream. As students complete work, applications can turn-in the work, set grades, attach student work, and store work in appropriate Drive folders.
  • Teacher users can create assignments with add-on attachments from your website or application.
  • Student users can turn in their assignments that have your add-on attachments.

What permissions does my application need to create or modify assignments?

Typically, an application can only modify work that it creates. In other words, any assignment mutation API requests must use the same Google Cloud project ID that was stored at the assignment creation time.

Google Classroom add-ons have an exception to this rule. A Cloud project can access or modify any announcement, assignment, or material that has one or more of its add-on attachments. A Cloud project can also turn in, reclaim, or return an assignment that has one or more of its add-ons attachments.

API requests also require the correct user scopes. Teachers can view assignments, create assignments, attach links to assignment submissions, and set submission grades. Students can view assignments, attach links to their assignment records, and turn-in and reclaim their submissions. Domain administrators can view CourseWork, but have no write permissions.

What types of items can my application attach to assignment or submissions?

The API supports attaching Drive files, YouTube videos, and links. Attaching native Google Forms is not yet supported.

Do end users know that an assignments in Classroom was created by my application?

Yes. The Classroom UI identifies externally created assignments using the product name of the Google Cloud project that created the work. Users can report externally created work as unwanted, as well as disconnect the application that created the work, by revoking any credentials issued to the application by the user.

Classroom share button and other integrations

I've already integrated with the Classroom share button. Can I modify an assignment created using the share button?

Not yet. To modify an assignment, the request must use the same Google Cloud project that created the assignment.

Can I answer questions in the API?

Not yet. You can create and modify questions.

Classroom add-ons

Project configuration

Can I convert a private Google Cloud project I used during development to a public project I can use in production?

You cannot convert a private Google Cloud project to a public one. You need two separate projects, one for development and the other for production.

Can a single Google Cloud project have two Google Workspace Marketplace listings?

No. You are unable to create two Google Workspace Marketplace listings for a single Google Cloud project.

It is possible, however, to bundle add-ons. Doing so allows a single Google Workspace Marketplace listing to represent multiple add-ons. Installing from such a listing would then install all of the add-ons in the bundle at once. Users would need to consent to all the scopes needed by bundled add-ons when authorizing.

Can an OAuth client from a different Google Cloud project be reused with a Google Cloud project for Classroom add-ons?

No, an OAuth client from a Google Cloud project other than the Classroom add-on Google Cloud project can't work. Access tokens generated by another Google Cloud project are denied by the Classroom API. You must create a separate OAuth client for the add-on project.

User experience

Our logo doesn't fit well within a small square, what size options are there for logos in the iframe title bar?

The iframe title bar was designed to only support a 32x32 square logo. This choice was made to match the favicon shape that companies use on their websites and it is our guidance to use the same logo in the space for brand consistency.

Domains

Do all teachers and students on the same domain have access to an installed add-on?

School Administrators have the ability to control which teachers can see an installed add-on. Classroom add-ons are only usable by users with a Teaching & Learning or the Education Plus license.

How do domain administrators interact with add-ons?

Domain administrators (Administrators) control who can use your add-on. They can install an add-on for an entire domain using the administrator installation option. If your add-on can be individually installed, note that most Administrators maintain an add-on allowlist; teachers can install add-ons for themselves that are on this list. An administrator might also opt to individually install your add-on for the purposes of testing.

Administrators may also be interested in usage statistics concerning your add-on. If supported by your product, consider providing add-on usage statistics in an administrator view on your own site.

API

What's a reliable way to know if the partner page is loaded inside an iframe or a popout tab?

There is no current method to distinguish between the two.

Which assignable work items get a Student Work Review iframe?

The Student Work Review iframe is only provided for activity-type attachments. Call the courses.courseWork.getAddOnContext method to reveal if the post type supports student work. The supportsStudentWork field can be true only for a post type that is an activity.

Can an add-on attachment access the stream item it is attached to?

Yes. You can get or patch any Announcement, CourseWork, or CourseWorkMaterial that contains at least one of your add-on attachments. You can reclaim, return, or turnIn a CourseWork StudentSubmission.

Single Sign-On

Yes, they can still use Google Sign-In.

Does every student have a properly formed email address, even if they don't have Gmail access?

Every Google Workspace for Education user has a Google identity, regardless of whether they have access to Gmail. Identities are represented by an email address. Identity and access to any particular Google Service (including Gmail) are distinct. So, even if Gmail is disabled, student users can sign in with their email address.

Does a school administrator need to pre-approve the app to allow students to sign in?

Domain administrators must allowlist an add-on before it can be installed. Optionally, domain administrators can install an add-on for all users within the domain or an organizational unit.

Feedback and general questions

How can I submit feature requests or request issues?

You can submit, view, and vote on feature requests in our public issue tracker.

How can I know when new features are available in the Classroom API?

Updates to the API are posted on the release notes page, our developer forum and the public issue tracker.

I'm using the Classroom API. How can I ask technical questions?

Post your questions on Stack Overflow with the google-classroom tag.