Reputation: 14783
Trying to get my head around the Google Drive API and being stuck on if I can get folders just via API key bypassing the OAuth2 authorization.
Particularly referring to this thread , which states it is simply possible by doing:
https://www.googleapis.com/drive/v2/files?q='FOLDERID'+in+parents&key=APIKEY
I'm getting an authorisation issue although the API key is correct. Also I find the ' '
really weird so I tried without and it gives me a 404
. Any help is much appreciated.
Upvotes: 1
Views: 1566
Reputation: 14783
For whomever it may be helpful but the issue is solved by URL encoding the '
:
https://www.googleapis.com/drive/v2/files?q=%27FOLDER_ID%27+in+parents&key=KEY_ID
and it works just fine.
Upvotes: 1