3

I`m automating uploading files to google drive using pydrive.

I`m trying to avoid the authentication page that shows google every time i authenticate with the api. enter image description here

I`ve read some blogs about it but I dont get anything clear.

Nat
  • 77
  • 8

1 Answers1

2

There are 2 ways in which you can accomplish what you are trying to do:

1 - You can use a Service account, there is a good example of how you could work on by using a service account the following thread.

2 - You can try using a Refresh token, you can check this thread that provides a good example on when you can use the Refresh token to automatize access to your own account.

Both scenarios should give you an idea of what's the best way to accomplish what you are trying to do depending on your approach.

Gabriel Carballo
  • 1,278
  • 1
  • 3
  • 9
  • I was trying the second option you proposed and I already got the following step "12 Copy the returned Refresh token and paste it into your app, source code or in to some form of storage from where your app can retrieve it." but I dont really know where to put it, I tried in the client_secrets.json but it didn`t work. – Nat Dec 15 '21 at 12:04