问题
Now, we have an application with Google Docs Api and 2 legged oauth. However,we want to migrate to Google Drive Api which uses Oauth 2.0.
Can we use 2 legged oauth with Google Drive Api? Is there any example?
回答1:
You should use Service Accounts: https://developers.google.com/accounts/docs/OAuth2ServiceAccount
回答2:
I just started looking into this and if I have any luck I will provide more info.
However, if you are using 2 legged oauth so you can work with google apps domain-wide then there is a published guide. I believe this is what the other answer was talking about.
Blog post explaining domain wide delegation: http://googleappsdeveloper.blogspot.com.es/2012/11/domain-wide-delegation-of-authority-and.html
Guide for the drive API: https://developers.google.com/drive/delegation
来源:https://stackoverflow.com/questions/12605705/does-google-drive-api-support-2-legged-oauth