Google Classroom アドオンの一般提供が開始されました。詳しくは、
アドオンのドキュメントをご覧ください。
Method: invitations.accept
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
招待を承認し、招待を削除して、招待したユーザーを指定されたコースの教師または生徒(該当する場合)に追加します。招待されたユーザーのみが招待を承諾できます。
このメソッドは、次のエラーコードを返します。
PERMISSION_DENIED
: リクエストしたユーザーがリクエストした招待を承認できない場合、またはアクセス エラーの場合。
FAILED_PRECONDITION
: 次のリクエスト エラーの場合:
- CourseMemberLimitReached
- CourseNotModifiable
- CourseTeacherLimitReached
- UserGroupsMembershipLimitReached
NOT_FOUND
: リクエストされた ID の招待が存在しない場合。
HTTP リクエスト
POST https://classroom.googleapis.com/v1/invitations/{id}:accept
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
id |
string
承諾する招待状の ID。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功した場合、レスポンスの本文は空の JSON オブジェクトになります。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/classroom.rosters
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: invitations.accept\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\nAccepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to accept the requested invitation or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `FAILED_PRECONDITION` for the following [request errors](/workspace/classroom/reference/Request.Errors):\n - CourseMemberLimitReached\n - CourseNotModifiable\n - CourseTeacherLimitReached\n - UserGroupsMembershipLimitReached\n- `NOT_FOUND` if no invitation exists with the requested ID.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/invitations/{id}:accept`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------|--------------------------------------------------|\n| `id` | `string` Identifier of the invitation to accept. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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)."]]