The Google Drive API says some files don’t exist when they actually do

So, I came to a conclusion in my application where I can get a list of spreadsheet documents from a Google Drive user account using the Google Spreadsheet API. I populate a list of files in a ui control that users can click to get a list of its worksheets. In some cases, this works as expected, while in others it doesn’t. In my request, I use a URL that is returned from the list of files, and even then the API responds:

Sorry, the file you have requested does not exist.
Make sure that you have the correct URL and that the owner of the file hasn't deleted it.

Well, of course, the file was not deleted. I returned it in response to my request for a list of files. I can also get to the file through a regular web browser. Also, the url is correct because the one the API responded to. My code does not handle the url that is returned in response to the initial files. In fact, here is the URL that is used to capture worksheets:

https://spreadsheets.google.com/feeds/worksheets/{long key here}/private/full

So, my question is why my request for some worksheets comes back with an answer with the actual list of worksheets, but on others (which I have access to and I know that exists), I get an erroneous answer.

Thanks Arye

+1
source share
2 answers

OAuth 2.0, Google. scope, OAuth, ( OAuth ).

:

https://spreadsheets.google.com/feeds

:

https://spreadsheets.google.com/feeds https://docs.google.com/feeds
+3

. , , , , , New Sheets. , ( , ), .

+1

Source: https://habr.com/ru/post/1537697/


All Articles