This code runs fine with the scope \"https://www.googleapis.com/auth/drive\"
File folderEntry = drive.files().get(\"XXXXj0_srDPPGUEtHaVYtZFljMEk\").execute();
St
I too get the same error. However this workaround does get all the children of a folder I created, until google fixes the query issue I suppose.
ChildList list = service.children().list(FILEID).execute();
This may be a bit late but... I believe the problem occurs because when you run with the scope https://www.googleapis.com/auth/drive.file you are only allowed to see the files your app has created. However, your query may potentially return metadata that are outside your auth scope.
I had the same problem as well and manage to fix it by adding the DRIVE_METADATA_READONLY scope:
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE_FILE, **DriveScopes.DRIVE_METADATA_READONLY**);