- [HTTP request](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.request_body)
- [Response body](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.CheckUserCapabilityResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#body.aspect)
- [Capability](https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability)

<br />

> [!WARNING]
> **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 `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.

Returns 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.

<br />

A requesting user can only check capabilities for themselves.

This method returns the following error codes:

- `PERMISSION_DENIED` if the requesting user is not permitted to check eligibility for the specified user.
- `INVALID_ARGUMENT` if the request is malformed.

### HTTP request

`GET https://classroom.googleapis.com/v1/userProfiles/{userId}:checkUserCapability`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `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 |

### Query parameters

| Parameters ||
|---|---|
| `capability` | ``enum (`https://developers.google.com/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`. |
| `previewVersion` | ``enum (`https://developers.google.com/workspace/classroom/reference/rest/v1/PreviewVersion`)`` Optional. The preview version of the API. |

### Request body

The request body must be empty.

### Response body

Response from checking user capabilities.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "capability": enum (`https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability`), "allowed": boolean } ``` |

| Fields ||
|---|---|
| `capability` | ``enum (`https://developers.google.com/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability`)`` The Classroom capability. |
| `allowed` | `boolean` Whether the specified capability is allowed for the user. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/classroom.courses`
- `
  https://www.googleapis.com/auth/classroom.courses.readonly`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## Capability

Enum to represent the capability.

| Enums ||
|---|---|
| `CAPABILITY_UNSPECIFIED` | Not supported. |
| `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. |
| `CREATE_RUBRIC` | The capability to create and modify Rubrics. |
| `UPDATE_GRADING_PERIOD_SETTINGS` | The capability to modify grading period settings. |
| `CREATE_STUDENT_GROUP` | The capability to create and modify student groups and their members. |