

# If there are no (valid) credentials available, let the user log in. # created automatically when the authorization flow completes for the firstĬreds = om_authorized_user_file('token.json', SCOPES) # The file token.json stores the user's access and refresh tokens, and is Prints the names and ids of the first 10 files the user has access to. """Shows basic usage of the Drive v3 API. # If modifying these scopes, delete the file token.json. Include the following code in quickstart.py:įrom googleapiclient.discovery import buildįrom google_auth_oauthlib.flow import InstalledAppFlowįrom import Requestįrom import Credentials In your working directory, create a file named quickstart.py.To install the Google client library for Python, run the following command: pip install -upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlibįor alternate installation options, refer to the Python library's Step 1: Install the Google client library A Google account with Google Drive enabled.To learn how toĬreate credentials for a desktop application, refer to Authorization credentials for a desktop application.Note: For this quickstart, you are enabling the "Drive API". A Google Cloud Platform project with the API enabled.To run this quickstart, you need the following prerequisites: I only have one user account on my machines.Complete the steps described in the rest of this page to create a simple PythonĬommand-line application that makes requests to the Drive API. I am able to successfully pin folders within Google Drive to Quick Access (for example, the "Projects" folder found at Google Drive > Documents > Projects) and these folders do not disappear from Quick Access it is only the root Google Drive folder that The Google Drive File Stream root folder is also pinned to Quick Accessīut does not disappear as the Google Drive folder (from Backup and Sync) does. I also have Google Drive File Stream installed, which is linked to a separate Google account. I performed a fresh install of Windows on a new machine and encounter the same thing there. However, after a period of a few hours to a few days, the shortcut disappears from Quick Access. Upon installation of Google Backup and Sync, the root Google Drive folder is automatically added to the Quick Access list. Google Drive Folder Disappears from Quick Access
