1
votes

I am using the Google Drive Quickstart Python API from here. I want to find the 'drive-python-quickstart.json' file on my windows system. Where is it actually stored? Where is '~/.credentials/drive-python-quickstart.json' in Windows?

If modifying these scopes, delete your previously saved credentials

at ~/.credentials/drive-python-quickstart.json

SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'

CLIENT_SECRET_FILE = 'client_secret.json'

APPLICATION_NAME = 'Drive API Python Quickstart'

2
At default Quickstart, 'drive-python-quickstart.json' is saved at home directory. If you use command prompt on windows, you can get home directory by echo %HOMEPATH%. If you use terminal with shell, you can get it by echo $HOME. If you want to put it on your current working directory, please change credential_path to os.path.join("./", 'drive-python-quickstart.json'). At that time, please delete home_dir, credential_dir, if. - Tanaike
Tanaike -- you should make your comment an answer so we can upvote it. (Also, thanks!) - nickvans

2 Answers

2
votes

~ refers to the Root location, in Windows. This can be for instance

C:\Users\<*user-name*>\.credentials folder.

Where <user-name> is your username (i.e. C:\Users\John\.credentials)

You will find the drive-python-quickstart.json file over there.

1
votes

I found it! In the Mac terminal, I used this command to go to the home directory: cd ~

I ran the ls command to see what was in there, but no .credentials directory. I tried sudo ls and bam, there it was. I used the rm command to delete the file and it worked for me.