2LO OAuth support - google-drive-api

I just read the news about discontinued Document List API with recommended migration to Drive API v2, but there seems to be zero support for 2LO OAuth for Google Apps domains.
What is a recommended approach for this?

You should use Service Accounts.
https://developers.google.com/accounts/docs/OAuth2ServiceAccount

Related

Google map API key credential additional methods

I have received a Google Map API Key and it seems to work just fine. Looking on the credential page of the GCP I see there are some alternate methods that I don't see documented anywhere. I have attached a screen shot of the specific page I am referring to, but I was wondering if anyone could give me insight on how to use these methods (OAuth and Service Accounts) or where I might find more documentation.
Thank you.
OAuth 2.0 Client IDs and Service Accounts may not be needed for Google Maps APIs. You will only need API keys to authenticate Google Maps APIs requests as explained here, so I think you can ignore the others.
But to give you an insights, as per the documentation here:
OAuths 2.0 Client IDs are used to allow your apps to access other Google Cloud products on behalf of the user.
Service Accounts are accounts that used by an app to make authorized API calls for other Google Cloud products. You can learn more here: https://cloud.google.com/iam/docs/service-accounts

How do I migrate from the Google Documents List API to the Drive API?

The Google Documents List API is scheduled to be shut down on April 20, 2015 and I need to migrate my code to use the Google Drive API instead. How do I go about this migration?
Refer to the migration guide determine you how to translate calls to the Documents List API to their corresponding calls in the Drive API. Refer to the Drive API’s documentation for information on how to download libraries and get started.
Be aware that support for older authorization methods (ClientLogin, AuthSub, and OAuth 1.0) are also scheduled to be shut down at the same time. If you are currently using these methods please also migrate to OAuth2 at the same time.

Do you need to migrate to Drive API when using https://spreadsheets.google.com/feeds/

The 22nd of January, I received an email with the subject 'Important: Steps to migrate from discontinued Documents List API' from Google Apps .
Important: Steps to migrate from discontinued Documents List API
Hello administrators,
We recently communicated that Documents List API will be discontinued on April 20, 2015. This change means that service calls for this API will no longer be supported, and any Google Apps features that are implemented using this API will no longer function.
Our records indicate that you may have an application that uses Documents List API, and we recommend that you migrate to Drive API, which has comparable
functionality, as soon as possible.
Here's what you need to do:
Determine if you have an application that makes requests to these
types of URLs:
https://docs.google.com/feeds/
https://docs.googleusercontent.com/
https://spreadsheets.google.com/feeds/
Migrate the applications to Drive
API. If you have questions
about migration, please contact Google Apps for Work Support.
Sincerely, The Google Apps for Work Team
I think it says that applications using https://spreadsheets.google.com/feeds/ should migrate to the new Drive API. But in the new Drive API, this URL is used too:
https://developers.google.com/google-apps/spreadsheets/#sheets_api_urls_visibilities_and_projections
Is there a typo somewhere in the URL either in the email or Drive API documentation?
Or is this email saying that when you determined you used any of these URL's you're OK?
PS: I opened a case at Google but I fear a late response, so I asked here.
Short answer is no.
The Docslist API is being discontinued because it has been replaced by the Drive API. In the case of the Spreadsheet API, there is no replacement API (yet - maybe one day), so it remains supported.
The only gotcha is that at some point, only OAuth 2 will be supported for authentication/authorisation so if you're using OAuth 1 or u/p, you have some work to do.
The official Google response is that the Spreadsheets API will continue to function after the 20 April shutdown:
"Apologies for the confusing email. The sheets API is not yet deprecated and will continue to operate beyond the April shutdowns."
https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3709

Understanding the authorization flow with Google Drive and Google Play Services

I have gone through Quickstart with Google Drive and I have also used Google Play Services. The docs for Google Drive outline the process of how the authorization flow works. The docs also indicate that developers should not use Drive initiated authorization although it appears that the Quickstart sample app does exactly that. I am left with the impression that Google prefers that the developer handle all the details of authorization.
Yet after trying out sample code that uses Google Play Services (but not for Google Drive), I am left with the impression that Google wants developers to use Google Play Services to handle all the authorization. It seems that Google Play Services simplify the authorization process significantly. Although the docs don't say this, I found elsewhere online that GoogleAuthUtil.getToken manages how access and refresh tokens are retrieved, especially after they expire.
Basically, the issue I am struggling with to understand is whether the Google Drive docs for the API are out of date and Google wants us to rely upon Google Play Services. There seems to be a lot of complexity in the Google Drive authorization process that Google Play Services has eliminated. At the same time, the docs for Google Drive API has been available for over half a year, so it makes me question why Google hasn't updated these docs to show any reflection on how Google Play Services are used with it.
Any insight into this would be appreciated.
The recommended approach for authorization on Android is using Google Play Services. The Android quickstart guide on the Google Drive SDK documentation covers exactly that:
https://developers.google.com/drive/quickstart-android
The Google Drive docs are out of date and Google should really update them. Retrieving tokens and authenticating users should be done using Google Play Services. The only thing you should be using the Google Drive API for is accessing the Google Drive service. Google Play Services handles all the details of authenticating users, retrieving access and refresh tokens and handling all the errors that can arise.

Using Google Drive API without registration on Google Chrome Store

Can I use Google Drive API without registration my extension on Google Chrome Store?
Yes you can. Your app only needs to be registered in the API Console.
You need to create a Client ID for web applications in the API Console and define callback URLs.
Basically it's about to get oAuth working in the first place... then you can really USE it.
Drive API has to be enabled there, under 'Services'.
UPDATE: This has changed in the meanwhile and was true for Drive API v1.
No.
You can use the Documents List API for that purpose.