All Products
Search
Document Center

Drive and Photo Service:FileRemovePermission

Last Updated:Aug 04, 2025

Cancels the permissions on a shared file.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/file/remove_permission HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectYes

The request parameters.

drive_idstringYes

The drive ID.

1
file_idstringYes

The file ID.

4221bf6e6ab43c255edc4463bf3a6f5f5d317406
member_listarray<object>Yes

The identities with whom the file is shared.

objectYes
identityIdentityYes

The identity to whom the permissions are granted, which is a user or a group.

role_idstringYes

The role ID. You can grant permissions by assigning roles to identities, or you can customize the permissions. To grant permissions by assigning roles to identities, specify role_id. role_id and action_list are mutually exclusive. If both parameters are specified, role_id has a higher priority.

Valid values:

SystemFileOwner: collaborator.

SystemFileDownloader: downloader.

SystemFileEditor: editor.

SystemFileEditorWithoutDelete: editor without permissions to delete the file.

SystemFileEditorWithoutShareLink: editor without permissions to share the file.

SystemFileMetaViewer: viewer of lists.

SystemFileUploader: uploader. SystemFileUploaderAndDownloader: uploader and downloader.

SystemFileDownloaderWithShareLink: downloader and sharer.

SystemFileUploaderAndDownloaderWithShareLink: uploader, downloader, and sharer.

SystemFileUploaderAndViewer: viewer and uploader.

SystemFileUploaderWithShareLink: uploader and sharer.

SystemFileViewer: viewer.

SystemFileDownloader

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{}

Error codes

For a list of error codes, visit the Service error codes.