0

What we want to do is to use Spreadsheet API and Calendar Resource API and to access to the API with 2-legged OAuth.
(Most likely, Service Account Authentication method in OAuth 2.0 is similar method. <2LO

To use these API, we tried Service Account Authentication method and successed in it.
However, the way of authentication with Service Account is not on the documents below. As for Spreasheet API, it should be used with OAuth 1.0 if implementing 2-legged OAuth. In terms of Calendar API, it should be used with 3-legged OAuth.

The success of retrieving data with Service Account is good for us and we ant to go on with it. But since the document doesn't tell us the way, we are confused if this is correct way. Can you tell me the way is whether formal admitted way by Google?

Spreadsheet API:
https://developers.google.com/google-apps/spreadsheets/?hl=ja#about_authorization_protocols

Calendar Resource API:
https://developers.google.com/admin-sdk/calendar-resource/auth

Thanks,

infoScoop
  • 15
  • 2

1 Answers1

0

All Google APIs now support OAuth2, including service accounts. The documentation for these APIs hasn't been updated to reflect the change, but it should work correctly.

Eric Koleda
  • 12,420
  • 1
  • 33
  • 51
  • I am having the same issue. I have a service account setup, I can connect, list, download docs, etc. Using my service account and 2-legged oauth 2. I use the scope of, https://www.googleapis.com/auth/drive. If I change my scope to https://spreadsheets.google.com/feeds, I cannot get an access token and I get a 401 unauthorized client - Unauthorized client or scope in request. I also tried including both, separated by a space in the scope and I cannot get and access token. There is also not an entry in the developers console to enable this api for my app project, any help appreciated. – Severun Apr 11 '15 at 01:23
  • If you change the scopes your service account is requesting you'll also need to update the scopes your Google Apps Marketplace app requests from admins, and then have admins re-approve the scopes. – Eric Koleda Apr 16 '15 at 14:26