This page walks you through creating OAuth2 credentials in Google Cloud Console, downloadingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eraiyanbupeterfrancis/AutoBackupTool/llms.txt
Use this file to discover all available pages before exploring further.
client_secrets.json, and authorizing AutoBackupTool to access your Google Drive. You only need to complete this setup once — after the first authorization, AutoBackupTool saves your token and reuses it automatically.
Create or select a Google Cloud project
Go to Google Cloud Console and sign in with your Google account. In the top navigation bar, click the project dropdown and either select an existing project or click New Project to create one for AutoBackupTool.
Enable the Google Drive API
Navigate to APIs & Services > Library in the left sidebar. Search for
Google Drive API and click on it in the results. Click Enable to activate the API for your project.Create OAuth client credentials
Go to APIs & Services > Credentials. Click Create Credentials and select OAuth client ID from the dropdown. When prompted for the application type, choose Desktop app, give it a name, and click Create.After the credential is created, click Download JSON in the confirmation dialog (or click the download icon next to the credential in the list). Rename the downloaded file to
client_secrets.json.Add test users (if your consent screen is in Testing mode)
If your OAuth consent screen is set to Testing status, only explicitly listed Google accounts can authorize the app. To add your account, go to APIs & Services > OAuth consent screen, scroll down to the Test users section, and click Add users. Enter your Google email address and save.You can check your consent screen status on the same OAuth consent screen page — it displays Testing or In production near the top.
Place client_secrets.json in your project directory
Move
client_secrets.json into the AutoBackupTool project folder — the same directory that contains backup_gui.py. AutoBackupTool looks for this file relative to where you run the app.First-run authorization
The first time you runbackup_gui.py, AutoBackupTool opens a browser window so you can sign in and grant it access to your Google Drive. After you approve, the token is saved locally to mycreds.txt. All subsequent runs use the saved token without reopening the browser.
Here is how AutoBackupTool handles credentials on every run (backup_utils.py):
- If
mycreds.txtdoes not exist, the browser flow runs and the token is saved. - If the token has expired, it is refreshed automatically and the updated token is saved back to
mycreds.txt. - If the token is valid, it is used directly — no browser interaction required.
mycreds.txt is the cached OAuth token written by GoogleAuth.SaveCredentialsFile. As long as this file exists and the token is valid (or can be refreshed), AutoBackupTool will authenticate silently on startup.