While any developer can make requests to the Google Classroom API, some Google Classroom features are only available to certain users. Each feature can have different requirements, such as having a certain Google Workspace for Education license type. For a detailed breakdown of features at each Google Workspace for Education license level, see the editions comparison page.
Features with eligibility requirements
The following Classroom API features are only available to eligible users:
Determine user capabilities
Requests to Classroom API are made on behalf of individual users. Therefore, you should check whether a user has the appropriate capabilities before issuing API requests with eligibility requirements.
To determine whether a user has a particular capability, make an API request to
the checkUserCapability
method. Include the appropriate Capability
type
for the Classroom feature you intend to use. Specify the
appropriate Capability
for each feature:
- To see if the user has access to a Classroom add-on owned by
the requesting Google Cloud project, pass the
CREATE_ADD_ON_ATTACHMENT
value. - To see if the user can modify grading period settings, pass the
UPDATE_GRADING_PERIOD_SETTINGS
.
Next, check the allowed
field in the response. If allowed
is true
, then
the user has access to the chosen Capability
. You can then make API requests
related the Capability
on behalf of the user.