Los complementos de Google Classroom ya están en fase de disponibilidad general para desarrolladores. Consulta la
documentación sobre complementos para obtener más información.
REST Resource: invitations
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Recurso: Invitación
Una invitación para unirte a un curso.
Representación JSON |
{
"id": string,
"userId": string,
"courseId": string,
"role": enum (CourseRole )
} |
Campos |
id |
string
Es el identificador que asigna Classroom. Solo lectura.
|
userId |
string
Es el identificador del usuario invitado. Cuando se especifica como un parámetro de una solicitud, este identificador se puede establecer en uno de los siguientes valores:
- el identificador numérico del usuario
- la dirección de correo electrónico del usuario
- el literal de cadena
"me" , que indica el usuario solicitante
|
courseId |
string
Es el identificador del curso al que se invitará al usuario.
|
role |
enum (CourseRole )
Es el rol que se le invita al usuario a tener. No debe ser COURSE_ROLE_UNSPECIFIED .
|
CourseRole
Son los posibles roles que se le pueden invitar a tener a un usuario.
Enumeraciones |
COURSE_ROLE_UNSPECIFIED |
No hay ningún rol en el curso. |
STUDENT |
Estudiante del curso. |
TEACHER |
Es el profesor del curso. |
OWNER |
Es el propietario del curso. |
Métodos |
|
Acepta una invitación, la quita y agrega al usuario invitado a los profesores o estudiantes (según corresponda) del curso especificado. |
|
Crea una invitación. |
|
Borra una invitación. |
|
Muestra una invitación. |
|
Muestra una lista de invitaciones que el usuario solicitante puede ver, restringida a aquellas que coinciden con la solicitud de lista. |
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[],[],null,["# REST Resource: invitations\n\n- [Resource: Invitation](#Invitation)\n - [JSON representation](#Invitation.SCHEMA_REPRESENTATION)\n- [CourseRole](#CourseRole)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Invitation\n--------------------\n\nAn invitation to join a course.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"userId\": string, \"courseId\": string, \"role\": enum (/workspace/classroom/reference/rest/v1/invitations#CourseRole) } ``` |\n\n| Fields ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` Identifier assigned by Classroom. Read-only. |\n| `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: - the numeric identifier for the user - the email address of the user - the string literal `\"me\"`, indicating the requesting user |\n| `courseId` | `string` Identifier of the course to invite the user to. |\n| `role` | `enum (`[CourseRole](/workspace/classroom/reference/rest/v1/invitations#CourseRole)`)` Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. |\n\nCourseRole\n----------\n\nPossible roles a user may be invite to have.\n\n| Enums ||\n|---------------------------|------------------------|\n| `COURSE_ROLE_UNSPECIFIED` | No course role. |\n| `STUDENT` | Student in the course. |\n| `TEACHER` | Teacher of the course. |\n| `OWNER` | Owner of the course. |\n\n| Methods ------- ||\n|-------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| ### [accept](/workspace/classroom/reference/rest/v1/invitations/accept) | Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. |\n| ### [create](/workspace/classroom/reference/rest/v1/invitations/create) | Creates an invitation. |\n| ### [delete](/workspace/classroom/reference/rest/v1/invitations/delete) | Deletes an invitation. |\n| ### [get](/workspace/classroom/reference/rest/v1/invitations/get) | Returns an invitation. |\n| ### [list](/workspace/classroom/reference/rest/v1/invitations/list) | Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. |"]]