Reputation: 41
Is there a javascript for getting the public folderId for my local googledrive versus having to manually go to the local googledrive directory and copying the result of the "ViewOnTheWeb" menu option? e.g. result is https://docs.google.com/folderview?id=XXXXXXXXXXXXXXXXXXX
i.e. get the id programmaticaly from a webpage once given the local directory
e.g. C:\Users\Me\Google Drive\Mypublicdirectory
Upvotes: 0
Views: 779
Reputation: 22286
Yes. use the Drive API as described here https://developers.google.com/drive/v2/reference/files.
Specifically you will probably want to use the query parameter on the folder's title.
Two gotchas to watch out for :-
So your query would be (in pseudo code) title = 'xxxxxx' and trashed=false and mimeType = application/vnd.google-apps.folder
Upvotes: 1