Create
|
|||||
|
|
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 or if the user already has this role or a role with greater permissions.ALREADY_EXISTS
if an invitation for the specified user and course already exists
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Manage your Google Classroom class rosters
Input
This building block consumes 4 input parameters
Name | Format | Description |
---|---|---|
courseId |
STRING |
Identifier of the course to invite the user to |
id |
STRING |
Identifier assigned by Classroom. Read-only |
role |
ENUMERATION |
Role to invite the user to have.
Must not be |
userId |
STRING |
Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following:
|
= Parameter name
= Format
courseId STRING Identifier of the course to invite the user to |
id STRING Identifier assigned by Classroom. Read-only |
role ENUMERATION Role to invite the user to have.
Must not be |
userId STRING Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following:
|
Output
This building block provides 4 output parameters
Name | Format | Description |
---|---|---|
courseId |
STRING |
Identifier of the course to invite the user to |
id |
STRING |
Identifier assigned by Classroom. Read-only |
role |
ENUMERATION |
Role to invite the user to have.
Must not be |
userId |
STRING |
Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following:
|
= Parameter name
= Format
courseId STRING Identifier of the course to invite the user to |
id STRING Identifier assigned by Classroom. Read-only |
role ENUMERATION Role to invite the user to have.
Must not be |
userId STRING Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following:
|