Google Drive API Access my account

I want to run a simple process on my server / laptop that will upload files to my Google drive daily, once a day. I do not want to share this, allow other users to use it, etc.

All the examples that, it seems to me, are related to viewing the address to obtain permission from the user (me), and then receiving the authentication code, etc. and processing

ref: Java quickstart

  • Is there a way / example for this without having to use a browser, getting permission to get a unique auth code every time I just want to do this for my account?
  • Is it possible to use a bash script with CURL commands instead of using Java?
+1
source share
1 answer
  • Yes. See How do I resolve an application (website or installed) without user intervention? (canonical?)

  • Yes. This is a complicated script if your file is large and you are making resumable downloads, but for small files this is entirely possible. You need to play a bit to get the correct encoding, mime body multiplayer, mime type and content size, but all this is extremely feasible. You will start by calling google auth authentication with the stored update token to get the access token. Then you set this access token in the header of the authorization channel as part of your request to download content.

+1
source

Source: https://habr.com/ru/post/1260568/


All Articles