InboxSwipe uses the Gmail API with a restricted scope (gmail.modify).
Google requires expensive annual security audits for public apps using this
scope — so instead, every self-hoster creates their own free Google Cloud
project in "Testing" mode. Takes ~15 minutes, costs nothing, and your email
never touches anyone else's infrastructure.
-
Go to console.cloud.google.com and create a new project (any name).
-
APIs & Services → Library → search "Gmail API" → Enable.
-
APIs & Services → OAuth consent screen:
- User type: External → Create
- Fill in app name and your email for both contact fields; skip logo and domains
- Skip the Scopes page — the app requests scopes at login
- Test users: add your own Gmail address (required — login fails without this)
- Confirm publishing status shows Testing
Google occasionally reorganizes this console area (you may see "Google Auth Platform" instead) — the settings are the same under slightly different navigation.
-
APIs & Services → Credentials → Create Credentials → OAuth client ID:
- Application type: Web application
- Authorized redirect URI:
http://localhost:3000/oauth/callback(exactly)
-
Copy the Client ID and Client Secret into your
.envfile.
- Refresh tokens expire every 7 days. You'll re-do the Google login weekly
(two clicks — your Google session persists).
- The app shows a Reconnect banner when this happens — reconnecting takes two clicks.
- The login shows a "Google hasn't verified this app" warning. This is expected — it's your app. Click Advanced → Go to (your app name).
- Max 100 test users, which doesn't matter for personal use.
| Error | Fix |
|---|---|
redirect_uri_mismatch |
Redirect URI in Google Console must be exactly http://localhost:3000/oauth/callback |
access_denied |
Your Gmail isn't added as a test user on the consent screen |
No refresh token returned |
Remove the app at myaccount.google.com/permissions and log in again |