Sorry, I do not know java, so I could not provide a sample code.
So, in Google Drive API V3, you can no longer get the root folder identifier using the getRootFolderId method using the "About Resource" command.
Instead, you need to use the file.get method, use root (instead of the file identifier) as fileId and request an additional id field (pass ?fields=id ) to get rootFolderId.
In the V3 API driver, by default they stopped returning the full resource. So be careful if you use any code related to V2.
Check out the Fields Section in the google api migration white paper.
Hope this helps.
thanks
source share