Hiện tại, các nhà phát triển đã có thể sử dụng rộng rãi tiện ích bổ sung của Google Lớp học! Vui lòng xem
tài liệu về tiện ích bổ sung để biết thêm thông tin.
Method: userProfiles.guardianInvitations.get
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về một lời mời dành riêng cho người giám hộ.
Phương thức này trả về các mã lỗi sau:
PERMISSION_DENIED
nếu người dùng yêu cầu không được phép xem lời mời dành cho người giám hộ của học viên do studentId
xác định, nếu người giám hộ không được bật cho miền có liên quan hoặc nếu có lỗi truy cập khác.
INVALID_ARGUMENT
nếu bạn chỉ định studentId
nhưng không nhận dạng được định dạng của studentId
(đây không phải là địa chỉ email, studentId
từ API hay chuỗi ký tự me
).
NOT_FOUND
nếu Lớp học không tìm thấy bản ghi nào của học viên được chỉ định hoặc invitationId
. Cũng có thể được trả về nếu học viên tồn tại nhưng người dùng yêu cầu không có quyền xem học viên đó.
Yêu cầu HTTP
GET https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
studentId |
string
Giấy tờ tuỳ thân của học viên mà bạn đang yêu cầu gửi lời mời cho người giám hộ.
|
invitationId |
string
Trường id của GuardianInvitation đang được yêu cầu.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của GuardianInvitation
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly
https://www.googleapis.com/auth/classroom.guardianlinks.students
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: userProfiles.guardianInvitations.get\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\nReturns a specific guardian invitation.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to view guardian invitations for the student identified by the `studentId`, if guardians are not enabled for the domain in question, or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if a `studentId` is specified, but its format cannot be recognized (it is not an email address, nor a `studentId` from the API, nor the literal string `me`).\n- `NOT_FOUND` if Classroom cannot find any record of the given student or `invitationId`. May also be returned if the student exists, but the requesting user does not have access to see that student.\n\n### HTTP request\n\n`GET https://classroom.googleapis.com/v1/userProfiles/{studentId}/guardianInvitations/{invitationId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|------------------------------------------------------------------------------|\n| `studentId` | `string` The ID of the student whose guardian invitation is being requested. |\n| `invitationId` | `string` The `id` field of the `GuardianInvitation` being requested. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly`\n- `\n https://www.googleapis.com/auth/classroom.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]