PyDrive icon indicating copy to clipboard operation
PyDrive copied to clipboard

How to use the pydrive when I get" The authentication flow has completed."

Open NiceSugar opened this issue 5 years ago • 1 comments

I use the pycharm.When I run next code .I can get the message: " The authentication flow has completed."Then what next?I have tried again and again.How can I continue my code.For example:continue upload?

from pydrive.auth import GoogleAuth gauth = GoogleAuth() gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication. from pydrive.drive import GoogleDrive

drive = GoogleDrive(gauth)

file1 = drive.CreateFile({'title': 'Hello.txt'}) # Create GoogleDriveFile instance with title 'Hello.txt'. file1.SetContentString('Hello World!') # Set content of the file from given string. file1.Upload()

NiceSugar avatar Mar 26 '19 05:03 NiceSugar

If you live in Chinese mainland, this script maybe not wrok at all. But it work fine in my foreign server on America.

QingGo avatar Apr 10 '19 03:04 QingGo