Upload files on cloud using email address

前端 未结 1 821
一向
一向 2021-01-25 18:56

So I am not sure if it is possible and if it is making sense at all. I am trying to learn and use cloud space in my application. So as a sample I was trying to create an applica

相关标签:
1条回答
  • 2021-01-25 19:56

    You can do it. You will need to navigate user to a specific URL, where he will input his email and password. After that Google will give you authorization code and refresh token. Refresh token can be used to retrieve authorization code whenever it is expired. This authorization code is used to work with user drive.

    If your application is a web application you may navigate user to google and set callback to your custom URL. If it is a windows forms application, then you have 2 options

    1. Create custom browser window and parse DocumentTitle property
    2. Navigate user's browser and ask him to copy-paste code from title (or do it automatically)

    You may download an example from here

    Just fill CLIENT_ID and CLIENT_SECRET constants.

    0 讨论(0)
提交回复
热议问题