Closed thekillgfx closed 4 years ago
@thekillgfx you need to use CommandLineAuth()
instead, most likely. LocalWebserverAuth()
runs a server (in your case on Repl.it machine) and you should be running browser on the same machine.
@shcheklein Where should I get the verification code
the console is asking me?
@thekillgfx it should also print a link you need to open in your browser and in your browser you will get the code.
@shcheklein
@thekillgfx when you were creating your app (to get client id, secret) you should have picked type other
or command line
(not web). I think you can go to the Google Console and change the type.
Thanks, now the authentication is finally working 💯
What am I looking to do? I would like to develope a script using Python3.6 to check every once in a while which files are located into a Google Drive folder with the folder id given, in return I'd like to receive a list containg all the files ids.
Where am I doing it? I'm working on Repl.it right now, but I'll move to Ubuntu server as soon as the script will work fine.
What I've done since I've started? I'm just at the start of the project since I'm having problems with the authentication to the Google Drive API, I've followed that https://pythonhosted.org/PyDrive/quickstart.html guide. Here you can see my OAuth 2.0 client ID settings -> https://imgur.com/a/S3n5Peh.
After starting the following script
The console output this
then I copy and paste the link into my Chrome browser and go on with the authentication until I got redirected to
http://localhost
, so I assume the authentication went well, right? But then the script doesn't go on: it seems to be stack ongauth.LocalWebserverAuth()
since the console never printed out"authenticaton went good"
. I assume that is because the browser from where I authenticate my user isn't in the same place of the script, this since I'm running the script on Repl.it but once I've moved to Ubuntu Server the problem would be the same!How can I solve this problem?