Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downloading 'App data' files from Google Drive using the Android Drive SDK

I had the google drive sdk quick start for android up and running.

What I am trying to do is to expand the application to be able to upload a file on the drive new 'App Data' folder and be able to download this file back again (Sync config files between android devies)

Uploading a file works fine. But When I try to download the same file, I can get its meta data like fileID, fileTitle, fileDownloadURL etc but can not download the the contents. I receive 401 Unauthorized error while trying.

I am usnig AUTH SCOPE "https://www.googleapis.com/auth/drive.appdata" to access appdata.

Any Idea why this is happening?

like image 574
Hazem Farahat Avatar asked Dec 11 '25 20:12

Hazem Farahat


1 Answers

I can reproduce this when only using the drive.appdata scope. If I add another Drive scope like the drive.readonly scope it works fine.

I agree this is a bug (or at least surprising behavior), so I will raise one, but please use the workaround above for now.

like image 198
Ali Afshar Avatar answered Dec 14 '25 08:12

Ali Afshar