이제 Google 클래스룸 부가기능이 일반적으로 개발자에게 제공됩니다. 자세한 내용은
부가기능 문서를 참고하세요.
Method: userProfiles.guardianInvitations.create
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
보호자 초대를 만들고 보호자에게 학생의 보호자임을 확인해 달라는 이메일을 보냅니다.
보호자가 초대를 수락하면 state
이 COMPLETED
로 변경되고 보호자 알림이 수신되기 시작합니다. 활성 보호자를 나타내는 Guardian
리소스도 생성됩니다.
요청 객체에 studentId
및 invitedEmailAddress
필드가 설정되어 있어야 합니다. 이러한 필드를 설정하지 않거나 요청에 다른 필드를 설정하면 오류가 발생합니다.
이 메서드는 다음 오류 코드를 반환합니다.
PERMISSION_DENIED
: 현재 사용자에게 보호자를 관리할 권한이 없거나, 해당 보호자가 해당 학생에 대한 요청을 이미 너무 많이 거부했거나, 해당 도메인에 보호자가 사용 설정되어 있지 않거나, 기타 액세스 오류가 있는 경우
RESOURCE_EXHAUSTED
: 학생 또는 보호자가 보호자 링크 한도를 초과한 경우
- 보호자 이메일 주소가 유효하지 않거나 (예: 너무 긴 경우) 제공된 학생 ID 형식을 인식할 수 없는 경우 (이메일 주소가 아니거나 이 API의
userId
가 아닌 경우) INVALID_ARGUMENT
읽기 전용 필드가 설정되거나 state
필드가 PENDING
이 아닌 값으로 설정된 경우에도 이 오류가 반환됩니다.
NOT_FOUND
: 제공된 학생 ID가 유효한 학생 ID이지만 클래스룸에 해당 학생의 기록이 없는 경우
ALREADY_EXISTS
: 학생에 대한 보호자 초대가 이미 대기 중이고 제공된 invitedEmailAddress
가 있거나 제공된 invitedEmailAddress
가 이 사용자의 기존 Guardian
의 Google 계정과 일치하는 경우
HTTP 요청
POST https://classroom.googleapis.com/v1/userProfiles/{guardianInvitation.studentId}/guardianInvitations
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
guardianInvitation.studentId |
string
학생의 ID (표준 형식)
|
요청 본문
요청 본문에 GuardianInvitation
의 인스턴스가 포함됩니다.
응답 본문
성공한 경우 응답 본문에 새로 생성된 GuardianInvitation
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위가 필요합니다.
https://www.googleapis.com/auth/classroom.guardianlinks.students
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: userProfiles.guardianInvitations.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `studentId` and `invitedEmailAddress` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit.\n- `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `userId` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`.\n- `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student.\n- `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invitedEmailAddress` provided, or if the provided `invitedEmailAddress` matches the Google account of an existing `Guardian` for this user.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/userProfiles/{guardianInvitation.studentId}/guardianInvitations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------------------------|-------------------------------------------------|\n| `guardianInvitation.studentId` | `string` ID of the student (in standard format) |\n\n### Request body\n\nThe request body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]