upload file to google drive without human interaction via SDK

岁酱吖の 提交于 2019-12-11 17:23:58

问题


I want to upload files to google drive. I'm using C# and have referred following links to get started

  1. https://developers.google.com/drive/v3/web/quickstart/dotnet
  2. https://developers.google.com/drive/v3/web/manage-uploads

I'm able to upload the file successfully to google drive but my main concern is I don't want to display any sort of UI/human interaction. It should be able to automatically upload the file.

Using OAuth2.0 there is a need that we have to manage and generate access/refresh token. I have no idea how these should be managed.

Isn't there any other way where the user can have access to google drive programmatically just by sharing his/her Gmail account username/password to achieve this?


回答1:


Isn't there any other way where the user can have access to google drive programmatically just by sharing his/her Gmail account username/password to achieve this?

No there is not

The user needs to authorise your app one time. After that, you can save Refresh Token and use that for future unattended use.



来源:https://stackoverflow.com/questions/46066239/upload-file-to-google-drive-without-human-interaction-via-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!