이제 Google 클래스룸 부가기능이 일반적으로 개발자에게 제공됩니다. 자세한 내용은
부가기능 문서를 참고하세요.
Method: invitations.create
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
초대를 만듭니다. 사용자 및 과정에 대한 초대는 한 번에 하나만 존재할 수 있습니다. 초대를 삭제하고 다시 만들어 변경합니다.
이 메서드는 다음 오류 코드를 반환합니다.
- 요청하는 사용자가 이 과정의 초대를 만들 권한이 없거나 액세스 오류인 경우
PERMISSION_DENIED
입니다.
- 과정 또는 사용자가 없는 경우
NOT_FOUND
입니다.
FAILED_PRECONDITION
:
- 요청된 사용자의 계정이 사용 중지된 경우
- 사용자에게 이미 이 역할 또는 더 높은 권한이 있는 역할이 있는 경우
다음 요청 오류에 대해
- IneligibleOwner
- 지정된 사용자 및 과정에 대한 초대가 이미 있는 경우
ALREADY_EXISTS
입니다.
HTTP 요청
POST https://classroom.googleapis.com/v1/invitations
URL은 gRPC 트랜스코딩 구문을 사용합니다.
요청 본문
요청 본문에 Invitation
의 인스턴스가 포함됩니다.
응답 본문
성공한 경우 응답 본문에 새로 생성된 Invitation
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위가 필요합니다.
https://www.googleapis.com/auth/classroom.rosters
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: invitations.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to create invitations for this course or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `NOT_FOUND` if the course or the user does not exist.\n- `FAILED_PRECONDITION`:\n - if the requested user's account is disabled.\n - if the user already has this role or a role with greater permissions.\n - for the following [request errors](/workspace/classroom/reference/Request.Errors):\n - IneligibleOwner\n- `ALREADY_EXISTS` if an invitation for the specified user and course already exists.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/invitations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains an instance of [Invitation](/workspace/classroom/reference/rest/v1/invitations#Invitation).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Invitation](/workspace/classroom/reference/rest/v1/invitations#Invitation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.rosters`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]