I have created an App that is supposed to copy a publicly shared Google Document to the logged-in user's Google Drive. It works well if the scope is set to https://www.googleapis.com/auth/drive
, but if I restrict it to https://www.googleapis.com/auth/drive.file
, I see the following error:
req-url: https://content.googleapis.com/drive/v3/files/1vpJM9XgJzBI6oHAZCupRTF0TdIvgiq5tTl1kYFt8zLg/copy?alt=json&key=AIzaSyAON3JJQtrQYO3RcuRQo7BnFw8hzVkEDUE
req-payload: {"name":"Invoice 23rd Apr 11:06pm","parents":["1mnBEoqL677quoLGpKHY-2kzh8j7WU-Od"]}
response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "File not found: 1vpJM9XgJzBI6oHAZCupRTF0TdIvgiq5tTl1kYFt8zLg.",
"locationType": "parameter",
"location": "fileId"
}
],
"code": 404,
"message": "File not found: 1vpJM9XgJzBI6oHAZCupRTF0TdIvgiq5tTl1kYFt8zLg."
}
}
NOTE
the src file is publicly available at https://docs.google.com/document/d/1vpJM9XgJzBI6oHAZCupRTF0TdIvgiq5tTl1kYFt8zLg/edit?usp=sharing