Create
                   
  | 
                 |||||
                   
  | 
                  
                   
  | 
                 ||||
Creates a teacher of a course.
This method returns the following error codes:
PERMISSION_DENIEDif the requesting user is not permitted to create teachers in this course or for access errors.NOT_FOUNDif the requested course ID does not exist.FAILED_PRECONDITIONif the requested user's account is disabled, for the following request errors:- CourseMemberLimitReached
 - CourseNotModifiable
 - CourseTeacherLimitReached
 - UserGroupsMembershipLimitReached
 
ALREADY_EXISTSif the user is already a teacher or student in the course
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View the email addresses of people in your classes
 - View the profile photos of people in your classes
 - Manage your Google Classroom class rosters
 
Input
This building block consumes 14 input parameters
| Name | Format | Description | 
|---|---|---|
courseId Required | 
                        STRING | 
                        Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias  | 
                    
userId | 
                        STRING | 
                        Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: 
  | 
                    
courseId | 
                        STRING | 
                        Identifier of the course. Read-only  | 
                    
profile | 
                        OBJECT | 
                        Global information for a user  | 
                    
profile.emailAddress | 
                        STRING | 
                        Email address of the user. Read-only  | 
                    
profile.photoUrl | 
                        STRING | 
                        URL of user's profile photo. Read-only  | 
                    
profile.permissions[] | 
                        OBJECT | 
                        Global user permission description  | 
                    
profile.permissions[].permission | 
                        ENUMERATION | 
                        Permission value  | 
                    
profile.name | 
                        OBJECT | 
                        Details of the user's name  | 
                    
profile.name.givenName | 
                        STRING | 
                        The user's first name. Read-only  | 
                    
profile.name.familyName | 
                        STRING | 
                        The user's last name. Read-only  | 
                    
profile.name.fullName | 
                        STRING | 
                        The user's full name formed by concatenating the first and last name values. Read-only  | 
                    
profile.id | 
                        STRING | 
                        Identifier of the user. Read-only  | 
                    
profile.verifiedTeacher | 
                        BOOLEAN | 
                        Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field will always be false. Read-only  | 
                    
                      = Parameter name
                      = Format
                
| 
                             courseId STRING Required Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias  | 
                    
| 
                             userId STRING Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: 
  | 
                    
| 
                             courseId STRING Identifier of the course. Read-only  | 
                    
| 
                             profile OBJECT Global information for a user  | 
                    
| 
                             profile.emailAddress STRING Email address of the user. Read-only  | 
                    
| 
                             profile.photoUrl STRING URL of user's profile photo. Read-only  | 
                    
| 
                             profile.permissions[] OBJECT Global user permission description  | 
                    
| 
                             profile.permissions[].permission ENUMERATION Permission value  | 
                    
| 
                             profile.name OBJECT Details of the user's name  | 
                    
| 
                             profile.name.givenName STRING The user's first name. Read-only  | 
                    
| 
                             profile.name.familyName STRING The user's last name. Read-only  | 
                    
| 
                             profile.name.fullName STRING The user's full name formed by concatenating the first and last name values. Read-only  | 
                    
| 
                             profile.id STRING Identifier of the user. Read-only  | 
                    
| 
                             profile.verifiedTeacher BOOLEAN Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field will always be false. Read-only  | 
                    
Output
This building block provides 13 output parameters
| Name | Format | Description | 
|---|---|---|
userId | 
                        STRING | 
                        Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: 
  | 
                    
courseId | 
                        STRING | 
                        Identifier of the course. Read-only  | 
                    
profile | 
                        OBJECT | 
                        Global information for a user  | 
                    
profile.emailAddress | 
                        STRING | 
                        Email address of the user. Read-only  | 
                    
profile.photoUrl | 
                        STRING | 
                        URL of user's profile photo. Read-only  | 
                    
profile.permissions[] | 
                        OBJECT | 
                        Global user permission description  | 
                    
profile.permissions[].permission | 
                        ENUMERATION | 
                        Permission value  | 
                    
profile.name | 
                        OBJECT | 
                        Details of the user's name  | 
                    
profile.name.givenName | 
                        STRING | 
                        The user's first name. Read-only  | 
                    
profile.name.familyName | 
                        STRING | 
                        The user's last name. Read-only  | 
                    
profile.name.fullName | 
                        STRING | 
                        The user's full name formed by concatenating the first and last name values. Read-only  | 
                    
profile.id | 
                        STRING | 
                        Identifier of the user. Read-only  | 
                    
profile.verifiedTeacher | 
                        BOOLEAN | 
                        Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field will always be false. Read-only  | 
                    
                      = Parameter name
                      = Format
                
| 
                             userId STRING Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: 
  | 
                    
| 
                             courseId STRING Identifier of the course. Read-only  | 
                    
| 
                             profile OBJECT Global information for a user  | 
                    
| 
                             profile.emailAddress STRING Email address of the user. Read-only  | 
                    
| 
                             profile.photoUrl STRING URL of user's profile photo. Read-only  | 
                    
| 
                             profile.permissions[] OBJECT Global user permission description  | 
                    
| 
                             profile.permissions[].permission ENUMERATION Permission value  | 
                    
| 
                             profile.name OBJECT Details of the user's name  | 
                    
| 
                             profile.name.givenName STRING The user's first name. Read-only  | 
                    
| 
                             profile.name.familyName STRING The user's last name. Read-only  | 
                    
| 
                             profile.name.fullName STRING The user's full name formed by concatenating the first and last name values. Read-only  | 
                    
| 
                             profile.id STRING Identifier of the user. Read-only  | 
                    
| 
                             profile.verifiedTeacher BOOLEAN Represents whether a G Suite for Education user's domain administrator has explicitly verified them as being a teacher. If the user is not a member of a G Suite for Education domain, than this field will always be false. Read-only  |