Google drive api: copy error with scopes “drive.fi

2019-02-27 09:56发布

My question is if it is not possible to copy a file from one folder in drive to another folder in drive with the google drive api if you only have the scopes "drive.file" and "drive.readonly"?

Tested using the API explorer: https://developers.google.com/drive/v2/reference/files/copy The error is: "The authenticated user has not granted the app X write access to the file Y".

Creating a file (using the same scopes) and copying it is possible however.

1条回答
霸刀☆藐视天下
2楼-- · 2019-02-27 10:26

Figured I ask and put the answer up since it's hard to find info about the google drive api.

It is possible but you also need the "drive.metadata" scope for it to work. You can ofc use the "drive" scope but that provides more access than needed.

查看更多
登录 后发表回答