Get shared link through Google Drive API

You can use the alternateLink property in the File resource to get a link that can be shared for opening the file in the relevant Google editor or viewer: https://developers.google.com/drive/v2/reference/files Update [With API V3](https://developers.google.com/drive/api/v3/reference/files it is suggested to use the webViewLink property.

Colaboratory: Can I access to my Google drive folder and file?

Here’s an example of using a FUSE Drive interface to access your Drive files like local files: https://colab.research.google.com/notebook#fileId=1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q In short: # Load the Drive helper and mount from google.colab import drive drive.mount(‘/content/drive’) After executing the code above, your Drive files will be present in /content/drive/My Drive. I’m guessing you also found the bundled example I/O … Read more

Google Drive API v3 Migration

First, read the official docs: v2 to v3 reference | Drive API v3 versus v2 | Migrate to v3 Download Download has changed. The field downloadUrl does not exist anymore. Now, it can be achieved with this: service.files().get(fileId).executeMediaAndDownloadTo(outputStream); I tried the new field webContentLink but it returns HTML content, instead of the file’s content. In … Read more