Search file in other google drives - google-drive-api

I have a google drive where am storing few google sheets. My java web application is able to search a file that is present in my own google drive using Javascript API. Is there a way to search for a specific files in other's google drive via code? i will be getting the shareable link to the google drive am supposed to search. can this be done? As far as i checked this is not possible. Also there is no where in google document that says i can search files in other's drive. Kindly someone confirm.

This is an OAuth question, not a GDrive question.
The account that the GDrive API will apply to is determined by the Access Token that it is called with. So, if you can get an Access Token for somebody else's Drive, then you can use that to search their drive. How you would get such a token will depend very much on the details of your use case and the trust relationship.

Related

Which Google API is Dropbox using to edit docs inside its own application?

I've been doing some research to find out which API dropbox is using to edit docs, sheets, and slides using google doc editors inside its own application. I've looked at Google Docs API, Google Drive API, and Google App Scripts I still don't have a clear answer.
From the looks of it files are uploaded to Dropbox, then can be opened in Google's editors and they are saved back to dropbox after editing. These files don't show in my google drive so I am assuming they are not being saved by Google.
These API are correct. It's your assumption that is wrongful. Dropbox may act as a Drive application and these files are outside of your reach, nevertheless still within your Drive.
Here it's explained: store application-specific data.

Is it possible to add a Google Drive UI or frame into an existing website?

Is it possible to add a Google Drive UI to an existing website? We offer a CRM to many clients and want to be able to have them log into their Google Drive accont and drop/pull fiels from it while on the website we provide.
If this exact question has already been answered, then please direct me to the response.
Thanks
You can use Google Drive Picker to access and upload files from/to Google Drive.
https://developers.google.com/picker/

Google Apps Script - Add file from Google Drive

First of all I want you to know that I'm not talking about uploading a file from users computer drive.
What Im aiming to do is to be able to allow users to add a file from their Google Drive to a specific folder in my Google Drive. I've searched around (a lot) and I can't find anything similar.
Have you ever seen this window? I could use something like it (it's in spanish but im sure you've seen it before). It allows you to upload a file from your pc or from your Google Drive:
Is it possible to access this pop up windows through Google Apps Script? If not, what are the alternatives?
What you have listed there is google picker. It can be used in apps script.
https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs
The docs for Drive picker can be found at:
https://developers.google.com/picker/docs/
What you can do, is use the Drive Picker API to allow users to chose files from their google drive.
Then once you have the File, you can add it to your folder.
https://developers.google.com/apps-script/reference/drive/folder#addFile(File)
https://developers.google.com/picker/docs/

Is it possible to protect google spreadsheet data using the web api?

I would like to programmatically create google spreadsheets that have some columns marked as 'read-only'. Using the web browser client this is straight forward, but I have not found any documentation on how to do this via the API. Is it possible?
You won't be able to do this by relying on the Drive API exclusively. The good thing is, there is a Google Sheets API. This will allow you to access your Sheet file and edit its content. More information can be found on this resource: https://developers.google.com/google-apps/spreadsheets/.

Is it possible to integrate Google Spreadsheet into a cloud application and store all app/user data on only one Google Drive account?

Hi Google Drive SDK team on Stackoverflow. I need a personal reply from you guys as this question is important for the backend architecture of a cloud application we are working on.
We want to integrate Google Spreadsheet in the frontend of a cloud application, but we want to structure the backend in such a way that all
user application data/files is stored only on one main Google Drive and not in the user's Google Drive. Does the Google Drive SDK or other Google
products enable the capabilityneed? From the Google Drive SDK page the typical use case is that an app stores data in the user's own Google Drive account.
Our case is different and we want to store all data in our own Google Drive account. Looking forward to your reply. Thanks
https://developers.google.com/drive/v2/reference/files/copy#examples
Its possible but you need to read more about how oauth works and spreadsheet permissions (btw im not from the drive team).
If you will use the users tokens your only option would be to have a backend create the spreadsheet on your drive (with you as the owner) and share it with the user.
If you will use your own tokens and not the user's, you will need a backend to serve as proxy for spreadsheet operations. That way you dont give write permission to the user (so she cant change your data). Drawback of using your own tokens is that you will have quota issues with many users.
The first thing you need to do is decide which API you intend to use.
The link you posted is for the Drive API. This will allow you to upload and download spreadsheets, but not manipulate their contents.
If you require row or cell level access to a spreadsheet, that will use the Spreadsheets API. See https://developers.google.com/google-apps/spreadsheets/
Next decide how you will deal with permissions. You want a centrally owned spreadsheet, so you have three choices.
Proxy all of the access through a web server as suggested by #zig
Access the spreadsheet directly, but use a centrally provided access token
Use a Service Account