Table of Contents
Setting up Google OAuth Credentials for Billdozer
Billdozer reads your Gmail through the Google API. To do this, it needs its own OAuth 2.0 credentials registered in Google Cloud. This is a one-time setup that takes about five minutes.
Why do I need this? Google requires every application that accesses Gmail to identify itself with credentials registered in their developer console. Billdozer runs entirely on your machine — your emails are never sent anywhere. The credentials simply allow it to ask Google for permission to read your inbox.
Step 1 — Sign in to Google Cloud Console
Go to console.cloud.google.com and sign in with any Google account. It does not have to be the Gmail inbox you want to scan — a separate personal or work account is fine.
Step 2 — Create a project
- Click the project selector in the top-left corner of the page (it may say "Select a project" or show the name of a previous project).
- Click New Project.
- Give it any name, e.g. Billdozer, and click Create.
- Wait a few seconds, then make sure the new project is selected in the dropdown.
Step 3 — Enable the Gmail API
- Go to APIs & Services → Library → Gmail API.
- Click Enable.
If you see a "Manage" button instead, the API is already enabled — you can continue.
Step 4 — Configure the OAuth consent screen
This step tells Google what your app is and who can use it.
- Go to APIs & Services → OAuth consent screen.
- Select External as the user type, then click Create.
- Fill in the required fields:
- App name — e.g. Billdozer
- User support email — your email address
- Developer contact information — your email address again
- Click Save and Continue.
- On the Scopes page, click Save and Continue without adding anything.
- On the Test users page:
- Click Add users.
- Enter the Gmail address you want to scan (e.g.
yourname@gmail.com). - Click Add, then Save and Continue.
- Review the summary and click Back to Dashboard.
Why do I need to add myself as a test user? Apps in "testing" mode — which is all you need for personal use — can only be used by accounts listed as test users. You never need to publish the app or submit it to Google for verification.
Step 5 — Create OAuth 2.0 credentials
- Go to APIs & Services → Credentials.
- Click + Create Credentials → OAuth client ID.
- Set Application type to Web application.
- Give it a name, e.g. Billdozer Web.
- Under Authorized redirect URIs, click + Add URI and enter:
This URI must match exactly — no trailing slash, no different port.http://localhost:9191/api/auth/gmail/callback - Click Create.
- A dialog appears with your Client ID and Client Secret. Keep this window open and copy both values into Billdozer's setup wizard.
Step 6 — Enter credentials in Billdozer
Open Billdozer at http://localhost:9191 and follow the setup wizard:
- In Step 1 — Gmail OAuth credentials, click "How to create OAuth credentials in Google Cloud" if you need a reminder of these steps inline.
- The Redirect URI field is pre-filled — use the Copy button to copy it before going back to Google Cloud.
- Paste your Client ID and Client Secret and click Save credentials.
"This app isn't verified" warning
When you click Connect Gmail and are redirected to Google's authorisation page, you may see a screen saying "Google hasn't verified this app". This is expected for personal/testing apps.
To continue:
- Click Advanced (bottom-left of the warning screen).
- Click Go to [your app name] (unsafe).
- Review the permissions (Billdozer requests read-only Gmail access) and click Continue.
This warning is about Google's app publication process, not about Billdozer's safety. Your data stays on your machine.
Troubleshooting
"Access blocked: App has not completed the Google verification process" You haven't added your Gmail address as a test user. Go back to Step 4 and add it under Test users.
"redirect_uri_mismatch" error
The redirect URI in your Google Cloud credentials doesn't exactly match http://localhost:9191/api/auth/gmail/callback. Open your OAuth client in Credentials, check the Authorized redirect URIs, and correct any mismatch.
"invalid_client" error The Client ID or Client Secret was copied incorrectly. Re-open your OAuth client in Google Cloud, regenerate the secret if needed, and paste both values again in Billdozer's setup wizard.
Gmail connection fails silently after redirect
Make sure Billdozer is running at http://localhost:9191 before starting the OAuth flow. If the server isn't running when Google redirects back, the callback will fail.