invitations

POST /v1/invitations

Changed on

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.

Request

  • Base URL
    https://classroom.googleapis.com
  • URL
    https://classroom.googleapis.com/v1/invitations
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/classroom.rosters
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/classroom.rosters

Request body

courseIdstring

Identifier of the course to invite the user to.

idstring

Identifier assigned by Classroom. Read-only.

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

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

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

courseIdstring

Identifier of the course to invite the user to.

idstring

Identifier assigned by Classroom. Read-only.

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

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

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

Changes

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status