Reputation: 25
I am trying to access Google Drive files from my android app and my website. I used two client ids, one for the android app (Client ID for installed applications) and the other one for the website (Client ID for web applications). Those client ids are belong to the same google apis project. Both Android and web applications are working properly. They can upload and list files. (their scope: https://www.googleapis.com/auth/drive.file = Per-file access to files created or opened by the app)
Here is a problem, Files that uploaded from Android app are not visible from web application...
I guess even if Android and web app have client ids from same google apis project, Google does not think they are one application service.
Is there any way to solve this problem? I wonder if there is a way to use one same google apis client id to web and Android app, or grant permission to read and modify files from both apps.
Upvotes: 1
Views: 305
Reputation: 6034
This is a known limitation from Android's OAuth 2.0 flow that will be resolve with the release of the Google Play Services (coming soon).
Take a look at this Google I/O 2012 session to learn more about how this works: https://developers.google.com/events/io/sessions/gooio2012/121/
In the meantime, one workaround you can use is passing the API key along with each request using the ?key=<API_KEY>
query parameter.
Upvotes: 1