All Products
Search
Document Center

Drive and Photo Service:FileAddPermission

Last Updated:Aug 04, 2025

Grants permissions to access files to a user or group.

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/add_permission HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

drive_idstringYes

The drive ID.

1
file_idstringYes

The ID of the folder. If you want to authorize a user or group to access a team drive, set this parameter to root. If you want to authorize a user or group to access an individual drive, you cannot set this parameter to root.

4221bf6e6ab43c255edc4463bf3a6f5f5d317406
member_listarrayYes

The members that are authorized to access files.

FilePermissionMemberNo

The authorization information.

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.