Lucky1981
Lucky1981

Reputation: 33

Drive API Update:

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=%270B6Gv6UcT0j6HY2VKbzktd2F1Z2M%27+in+parents&spaces=drive&fields=files(mimeType%2Cid%2Cname%2CthumbnailLink%2CimageMediaMetadata%2Cdescription)&key=xxx

Thanks for your help.

Upvotes: 1

Views: 96

Answers (1)

vdawg
vdawg

Reputation: 172

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]

Upvotes: 2

Related Questions