How to view and edit mounted gdrive files in gspread format without authentication on google colab? - google-colaboratory

I have mounted the google drive using the in-built function on google colab.
According to google, this means that the files should act as if they were accessible and editable from the local directory.
However, file = open("file path", "r+") leads to "AttributeError: module 'gspread' has no attribute 'open'".
How do you open and edit these gspread files without further authentication beyond the automatic authentication of mounting gspread (i.e, not using the gc.open_by_url() approach)?

Related

How to download files generated in Colab to dropbox directly?

I am training a model on Google Collaboratory. Is it possible to download it directly into my dropbox account (similar to how we write directly into the mounted Google Drive)?

Onenote Single Notebook Access

We use onenote api's to access user's onenote notebooks and sync to our system.
When we do oauth for the first time, we get options like 'office.onenote_update_by_app' which allow us to create / edit pages in any of the user notebook and read only those pages.
But we need an option for user to allow us to access only 1 specific notebook. All the pages, sections created by a user directly in that notebook should also be accessible by our app. And no other notebook should be accessible in any way.
Please suggest solution.

Denied Access downloading file from google drive api

How to upload a file using the google drive api and when the file is getting opened it will not show a restriction message and allow any user to open it.
For example I have this URL
https://drive.google.com/file/d/1cvmvU-Tz66Z7x3ukHqLgoB9BY9pxftrn/view?usp=drivesdk
That was uploaded from the app but it got restricted.
You have the control to share files from Google Drive and upload files and folders to Google Drive.
You can share the files and folders that you store in Google Drive
with anyone in your work or school, but your organization may limit
how you can share files with other people.
Also, you can visit this help forum post on to what extent you can allow everyone to upload in your drive.
Additional reference: Drive API Documentation

Download files from a specific user's drive with google drive api

Is there a way to download files from a specific google drive, by using the google drive api? Currently i can only read the drive of the google user logged in.
Inorder to access data owned by someone on Google drive you need their permission. You can't just access my files unless I let you. The most common method for this is oauth2 but you can also use a service account.
Now if I set a file to public you would be able to read it using an API key but I would have to give you the file id.

Accesing files from shared in google drive

Im using drive api sample code for accessing google drive files in my app.But i cannot access the files that were shared with me.Do i need to change scope of google drive api in ios to access all files shared with me?
To get a list of the files shared with you, you can use the drive.files.list request with the sharedWithMe filter.