Google Drive API grant access to another/multiple Apps - google-drive-api

Currently, we have a mobile App that is storing data into a Google Drive folder using the scope
https://www.googleapis.com/auth/drive.file
View and manage Google Drive files and folders that you have opened or created with this app
Now we are planning to add a web app as well. The problem is, that the web app cannot access files uploaded by the mobile app and vice versa.
So is there a way to tell the Google Drive API that those two apps (web app and the mobile app) are in fact the 'same' application?
I want to avoid using the scope for full access to the user's Google Drive.
https://www.googleapis.com/auth/drive
Or is there another way that both apps can read/write the same folder?
Thanks in advance.
I also took a look at the Google Picker API but it does not seem to be what I want.

Posting this for documentation purposes.
As mentioned in comments, both apps should be part of the same Google Cloud Platform project, that's the only way to "tell" the API that they are the same application.
If they are not part of the same project, you should use the drive scope instead.

Related

How to integrate google-drive with google apps using APIā€¦?

i need to know how to open google drive files in google apps(like actual google drive file open) with API.Please give me an idea to implement this.
To integrate your application in Google Drive, first you need to enable the Drive API and provide configuration details in your API project and this part of documentation will explain you with that.
Then the Drive UI Integration part will contains fields to enter information describing your application. The Application Name and Short Description fields are displayed to users in the Manage apps dialog in the Drive UI
Go to Drive API, then after you enable, you can see the Drive UI Integration tab.
For the Opening of files, this link will help you on that. There is also a sample code here that will serve as a guide on you.

Should I list my new app on the google apps marketplace, or is the chrome web store enough?

I want to list a new application that will integrate with the Drive UI. Should I list it on the Google Apps Marketplace?
This seems like an obvious "yes," but the documentation seems to say that I only need to upload a manifest file to the Chrome Web Store.
I've been very confused by seemingly contradictory docs and links across different brands, versions of documentation, etc. If anyone can share a succinct list of steps to making my app available to install on a Google Apps domain, I'd appreciate any tips!
You should list your Drive App on the Google Apps marketplace if you want Google Apps Customers use your app. You can list your apps for either Enterprise users or Consumers (gmail and the like) but not both. To list your Drive App in the Marketplace, make sure you specify "container": ["DOMAIN_INSTALLABLE", "GOOGLE_DRIVE"] in your manifest. Note that you should not specify the app member in the manifest as that would make it a consumer app and is not compatible with the Google Apps Marketplace.
We're constantly working to improve our documentation but your feedback is noted.

How can I build a Desktop client for Google Drive?

I want to build desktop application for Windows OS and use Google Drive to save some data in the cloud. After reading Google Drive SDK I found that only Web-applications, were installed from Chrome Web Store are allowed to use API and have access to data on Google Drive.
So my question: do I have any way to build native client (C++, Windows) for Google Drive? I know about hacks with using Google Docs API - but they can stop working any time, and I want something stable. Why Google team do not allow me create desktop application for their service? I have support of many other cloud storages and they do not have such restrictions.
Thanks.
For now you will have to use the (older) Google Document List API which provides full read-write and list access to Google Drive. (Google Drive and the former Google Docs use the same data)
So until we extend the capabilities of the current Drive API to cover the Google Document List use case you should use that instead.
EDIT: We just launched the v2 of the Google Drive SDK so you should now use that instead.
I have been working on a similar problem. I have realized that there is no straight forward way for doing this. Google Drive SDK is not easy to work with and how someone can simplify the process of connecting desktop application to Google drive shortly. I know this is not much help, but I am looking for a soltuion as well.
Here is some links that I have come across, haven't solved my problem either, but if you come to a solution please let us know PLEASE:
How to make GUI Client to upload file in java
Using Java APIs for downloading file from the Google Drive
http://www.coderanch.com/t/643120/Servlets/java/upload-file-drop-box-file

Upload File to Drive Remotely

I was trying to upload files to google drive from a Desktop Application, but i couldnt find how to do it with Google Drive API since that is based for google browser apps. For this matter should i use Google Drive API or Documments API?
You can use both Drive API or Documents List API to achieve, but the Drive API has the additional requirement that Apps need to be installed (for now) from the Chrome Web Store. Once installed, if you authorize the user with OAuth 2.0, you can use the Drive API in a desktop app.

Access to all files on a user's Google Drive

The api's for SkyDrive and Dropbox have options for managing the user's entire drive. For Google Drive, the drive.file scope seems to give only access to the files created by the app.
Is there a scope for Google Drive that gives access to the entire drive?
Edit: The below answer was correct, but the latest version of the Drive API allows requesting of a full scope with https://www.googleapis.com/auth/drive. The Documents List API is no longer needed for this use case. See https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app
To be precise the Drive API gives access to Files created by the app and files that the user has opened with the app from the Drive UI (through open-with).
To manipulate all of the Drive files of the user you can use the Google Document List API . Though we currently forbid Drive applications (the ones that have get integrated in the Drive UI through the Open-with and Create dialogs) to request access to the Document List API as we want to keep Drive application on a per-file security model. (Basically adding the Document List scope in the Drive SDK settings raises an error).