简体   繁体   中英

Unable to get list of all files using google drive API

I am currently integrating goggle drive with my Java web application and I have an issue while getting the list of files associated with a account. I am using https://content.googleapis.com/drive/v2/files?key= {API-key} to get the list of files, but I am only getting the folders and files which are created from with in my application I am not able to get all the folders for that particular account.

For the same account when I tested it through 'try it' on 'developers.google.com' I am able to get all the folders and files

I am not able to understand why I am not getting all folders when I make the call from my application, should I be request for any extra permissions from google? Please help me what should I do

This behavior occurs when you only select the drive.files scope, which will only list the items created and/or modified by the application. You will need all of the listed scopes in this document ( https://developers.google.com/drive/v2/reference/files/list ) in order to access all the files from your drive account. Be sure to add all the scopes under your project, at https://console.developers.google.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM