v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1310484273.7 KB
invitations

Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to create invitations for this course or for access errors. * NOT_FOUND if the course or the user does not exist. * FAILED_PRECONDITION: * if the requested user's account is disabled. * if the user already has this role or a role with greater permissions. * for the following request errors: * IneligibleOwner * ALREADY_EXISTS if an invitation for the specified user and course already exists.

post/v1/invitations

Request body

role'COURSE_ROLE_UNSPECIFIED' | 'STUDENT' | 'TEACHER' | 'OWNER'

Role to invite the user to have. Must not be COURSE_ROLE_UNSPECIFIED.

courseIdstring

Identifier of the course to invite the user to.

idstring

Identifier assigned by Classroom. Read-only.

userIdstring

Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following: * the numeric identifier for the user * the email address of the user * the string literal "me", indicating the requesting user

Response

Successful response