이제 Google 클래스룸 부가기능이 일반적으로 개발자에게 제공됩니다. 자세한 내용은
부가기능 문서를 참고하세요.
Method: userProfiles.checkUserCapability
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
사용자가 지정된 클래스룸 기능을 사용할 수 있는지 여부를 반환합니다. 예를 들어 이 엔드포인트를 사용하여 사용자가 부가기능 첨부파일을 만들 수 있는지 확인할 수 있습니다.요청하는 사용자는 자신의 기능만 확인할 수 있습니다.
이 메서드는 다음 오류 코드를 반환합니다.
PERMISSION_DENIED
요청하는 사용자에게 지정된 사용자의 자격 요건을 확인할 권한이 없는 경우
- 요청 형식이 잘못된 경우
INVALID_ARGUMENT
HTTP 요청
GET https://classroom.googleapis.com/v1/userProfiles/{userId}:checkUserCapability
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
userId |
string
필수입니다. 사용자의 식별자입니다. 요청의 매개변수로 지정된 경우 이 식별자는 다음 중 하나일 수 있습니다.
- 사용자의 숫자 식별자
- 사용자의 이메일 주소
- 요청하는 사용자를 나타내는 문자열 리터럴
"me"
|
쿼리 매개변수
매개변수 |
capability |
enum (Capability )
필수입니다. 이 사용자에 대해 확인해야 하는 기능입니다. 예를 들어 사용자가 애드온 첨부파일을 만들 수 있는지 확인하려면 이 값을 CREATE_ADD_ON_ATTACHMENT 로 설정합니다.
|
previewVersion |
enum (PreviewVersion )
선택사항입니다. API의 미리보기 버전입니다.
|
응답 본문
사용자 기능을 확인한 결과입니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"capability": enum (Capability ),
"allowed": boolean
} |
필드 |
capability |
enum (Capability )
클래스룸 기능
|
allowed |
boolean
사용자에게 지정된 기능이 허용되는지 여부입니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/classroom.courses
https://www.googleapis.com/auth/classroom.courses.readonly
자세한 내용은 승인 가이드를 참고하세요.
역량
열거형 |
CAPABILITY_UNSPECIFIED |
지원되지 않음. |
CREATE_ADD_ON_ATTACHMENT |
요청을 만드는 데 사용된 OAuth 클라이언트 ID의 Developer Console 프로젝트와 연결된 AddOnAttachments를 만들고 수정하는 기능입니다. |
CREATE_RUBRIC |
루브릭을 만들고 수정하는 기능 |
UPDATE_GRADING_PERIOD_SETTINGS |
평가 기간 설정을 수정하는 기능 |
CREATE_STUDENT_GROUP |
학생 그룹 및 학생 그룹 구성원을 만들고 수정하는 기능 |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-06(UTC)
[null,null,["최종 업데이트: 2025-08-06(UTC)"],[],[],null,["# Method: userProfiles.checkUserCapability\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.CheckUserCapabilityResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Capability](#Capability)\n\n\u003cbr /\u003e\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. This feature is available in [V1_20240930_PREVIEW](https://developers.google.com/workspace/classroom/reference/rest/v1/PreviewVersion) and later. See [Access Preview APIs](https://developers.google.com/workspace/classroom/reference/preview) to learn more.\nReturns whether a user may use the specified Classroom capability. For example, this endpoint can be used to check whether a user may create add- on attachments.\n\n\u003cbr /\u003e\n\nA requesting user can only check capabilities for themselves.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to check eligibility for the specified user.\n- `INVALID_ARGUMENT` if the request is malformed.\n\n### HTTP request\n\n`GET https://classroom.googleapis.com/v1/userProfiles/{userId}:checkUserCapability`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string` Required. Identifier of the user. When specified as a parameter of a request, this identifier can be 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\n### Query parameters\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `capability` | `enum (`[Capability](/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability)`)` Required. The Capability that should be checked for this user. For example, to check whether a user can create an [add-on attachment](https://developers.google.com/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments#resource:-addonattachment), set this to `CREATE_ADD_ON_ATTACHMENT`. |\n| `previewVersion` | `enum (`[PreviewVersion](/workspace/classroom/reference/rest/v1/PreviewVersion)`)` Optional. The preview version of the API. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse from checking user capabilities.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"capability\": enum (/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability), \"allowed\": boolean } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `capability` | `enum (`[Capability](/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability)`)` The Classroom capability. |\n| `allowed` | `boolean` Whether the specified capability is allowed for the user. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/classroom.courses`\n- `\n https://www.googleapis.com/auth/classroom.courses.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nCapability\n----------\n\nEnum to represent the capability.\n\n| Enums ||\n|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CAPABILITY_UNSPECIFIED` | Not supported. |\n| `CREATE_ADD_ON_ATTACHMENT` | The capability to create and modify AddOnAttachments associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. |\n| `CREATE_RUBRIC` | The capability to create and modify Rubrics. |\n| `UPDATE_GRADING_PERIOD_SETTINGS` | The capability to modify grading period settings. |\n| `CREATE_STUDENT_GROUP` | The capability to create and modify student groups and their members. |"]]