Google Drive changing permissions by service accou

2019-06-22 16:20发布

Looking for the best current approach for admins of a Google Apps domain to modify the permissions of a Google Drive object owned by other users. I'll be developing the app on Google App Engine.

It was straightforward using 2 legged OAuth and the Google Documents List API: https://developers.google.com/gdata/docs/auth/oauth#2LeggedOAuth but now that Google Drive SDK is the live API, I see that service accounts are the encouraged method: Does google Drive api support 2 legged oauth? and https://developers.google.com/accounts/docs/OAuth2ServiceAccount . So I'm following an example that uses this approach and the Prediction API: https://developers.google.com/appengine/articles/prediction_service_accounts and you cannot use the GAE service account in the Team section of the API console. Get an error: "User xxx@appspot.gserviceaccount.com may not be added to project "New Proj Name". Only members from domain myappsdomain.com may be added.

So, I'm basically asking: 1) How do you use service accounts with Google Drive SDK for admin tasks like changing permissions 2) And any working GAE service account tutorials using the Drive API that work with non-domain users.

1条回答
甜甜的少女心
2楼-- · 2019-06-22 16:47

The documentation about Service Accounts and user impersonation has just been added:

https://developers.google.com/drive/service-accounts

https://developers.google.com/drive/user-impersonation

Unfortunately, App Engine Service Accounts are not supported by Google Drive yet.

查看更多
登录 后发表回答