简体   繁体   中英

How to Find Resource Id for Google Drive File

I was looking through the Android Google Drive API and understood its overall workings but I was wondering what exactly the resource id of a file or folder is. Can this only be found for a query or is can this be found simply through looking at the document? Furthermore, is there any way to access a public Google Drive document through the API?

By doing Files: list you get back a list of all the files and directories with in a directory.

Google returns to you a file Resource for each file or directory you will find the id or the resource id for that file. Check out the q option for files: list you can search on file name with that to find the resource id for the file you want. I am actually not sure if you can see that by looking at the document on the website.

Side note: folders are also consider to be files in Google Drive API they just have a mime type of

"mimeType": "application/vnd.google-apps.folder",

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