Method: labels.permissions.create
Stay organized with collections
Save and categorize content based on your preferences.
Updates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
HTTP request
POST https://drivelabels.googleapis.com/v2/{parent=labels/*}/permissions
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The parent label resource name on the label permission is created. Format: labels/{label} .
|
Query parameters
Parameters |
useAdminAccess |
boolean
Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the label before allowing access.
|
Request body
The request body contains an instance of LabelPermission
.
Response body
If successful, the response body contains a newly created instance of LabelPermission
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-04 UTC.
[null,null,["Last updated 2025-08-04 UTC."],[],[],null,["# Method: labels.permissions.create\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- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is updated. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.\n\n### HTTP request\n\n`POST https://drivelabels.googleapis.com/v2/{parent=labels/*}/permissions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent label resource name on the label permission is created. Format: `labels/{label}`. |\n\n### Query parameters\n\n| Parameters ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useAdminAccess` | `boolean` Set to `true` in order to use the user's admin credentials. The server will verify the user is an admin for the label before allowing access. |\n\n### Request body\n\nThe request body contains an instance of [LabelPermission](/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [LabelPermission](/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive.labels`\n- `\n https://www.googleapis.com/auth/drive.admin.labels`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]