Home > Net >  Drive API Update:
Drive API Update:

Time:09-22

I use the following API call (with a valid key) and it has stopped working for one folder but still works for another. When it doesn't work I get an empty "files": [] response rather than a error. I can see that the update has impacted the folder that doesn't work but I don't understand why as they both look the same. I have tried appending &resourcekey=yyy but it makes no difference.

What can I do to fix the problem in either the Drive UI, the API credentials, or in the API call?

https://www.googleapis.com/drive/v3/files?q='0B6Gv6UcT0j6HY2VKbzktd2F1Z2M' in parents&spaces=drive&fields=files(mimeType,id,name,thumbnailLink,imageMediaMetadata,description)&key=xxx

Thanks for your help.

CodePudding user response:

Be sure to pass the following HTTP header:

X-Goog-Drive-Resource-Keys

along with your request, and set its value to:

[FOLDER_ID]/[FOLDER_RESOURCE_KEY]
  • Related