Evan
Evan

Reputation: 287

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?

Upvotes: 2

Views: 2435

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117321

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",

Upvotes: 3

Related Questions