Back

Gmail Bill Import Setup

Follow these steps to create Google OAuth credentials and connect Gmail for bill scanning.

1. Create a Google Cloud Project

  1. Open Google Cloud Console.
  2. Create a new project (e.g., “Roommate Bill Tracker”).
  3. Make sure the new project is selected.

2. Enable APIs

  1. Go to APIs & Services → Library.
  2. Enable Gmail API.
  3. Enable People API (required to fetch connected email address).

3. Configure OAuth consent screen

  1. Go to APIs & Services → OAuth consent screen.
  2. Select External user type.
  3. Fill app name + support email.
  4. Add scopes: gmail.readonly and userinfo.email.
  5. Add your Gmail address to Test users while in testing.

4. Create OAuth credentials

  1. Go to APIs & Services → Credentials.
  2. Create OAuth Client ID (Web application).
  3. Add redirect URI: https://divvi.tech/api/gmail/callback.
  4. Copy the Client ID and Client Secret.

5. Add credentials in Divvi

  1. Open Settings → Gmail Bill Import.
  2. Paste Client ID + Secret into Gmail OAuth Credentials.
  3. Click Save Credentials, then Connect Gmail.

Troubleshooting

  • Access blocked: ensure redirect URI matches exactly.
  • 403 access_denied: add the Gmail account to Test users.
  • Unverified app warning: click Advanced → Continue.