Google Integration

Sync your Google Contacts, Calendar, and Tasks with BlackBook. This is optional - BlackBook works great without it.

What Gets Synced

  • 📇 Contacts - Import and sync with Google Contacts
  • 📅 Calendar - View Google Calendar events
  • ✅ Tasks - Sync with Google Tasks
  • 📧 Gmail - View recent emails with contacts

Setup Overview

Google integration requires creating OAuth credentials in Google Cloud Console. This is a one-time setup that takes about 10 minutes.

Why OAuth? BlackBook uses OAuth so your Google password is never stored. You authorize BlackBook directly through Google's secure login.

Step 1: Create Google Cloud Project

  1. Go to console.cloud.google.com
  2. Sign in with your Google account
  3. Click the project dropdown (top left) → "New Project"
  4. Name it "BlackBook" or similar
  5. Click "Create"

Step 2: Enable APIs

  1. Go to APIs & Services → Library
  2. Search for and enable each of these:
    • Google People API (for Contacts)
    • Google Calendar API
    • Google Tasks API
    • Gmail API
  3. Click "Enable" for each API

Step 3: Configure OAuth Consent Screen

  1. Go to APIs & Services → OAuth consent screen
  2. Select "External" user type → Create
  3. Fill in:
    • App name: "BlackBook"
    • User support email: Your email
    • Developer contact: Your email
  4. Click "Save and Continue"
  5. On Scopes page, click "Add or Remove Scopes"
  6. Add these scopes:

    https://www.googleapis.com/auth/contacts

    https://www.googleapis.com/auth/calendar.readonly

    https://www.googleapis.com/auth/tasks

    https://www.googleapis.com/auth/gmail.readonly

  7. Save and Continue through remaining steps

Step 4: Create OAuth Credentials

  1. Go to APIs & Services → Credentials
  2. Click "Create Credentials" → "OAuth client ID"
  3. Application type: "Web application"
  4. Name: "BlackBook Desktop"
  5. Add Authorized redirect URIs:

    http://localhost:8000/auth/google/callback

    http://localhost:51820/auth/google/callback

  6. Click "Create"
  7. Copy your Client ID and Client Secret

Save these! You'll need the Client ID and Client Secret for BlackBook setup.

Step 5: Add Test Users (Important!)

While your app is in "Testing" mode, only authorized test users can sign in.

  1. Go to OAuth consent screen
  2. Scroll to "Test users" section
  3. Click "Add Users"
  4. Add your Google email address
  5. Save

Step 6: Configure BlackBook

  1. Open BlackBook Settings
  2. Go to "Google Integration"
  3. Enter your Client ID and Client Secret
  4. Click "Save"
  5. Click "Connect Google Account"
  6. Sign in with your Google account
  7. Grant the requested permissions

Troubleshooting

"Access blocked" error

Make sure your email is added as a test user in the OAuth consent screen.

"Redirect URI mismatch"

Verify the redirect URIs in Google Cloud Console match exactly:

  • http://localhost:8000/auth/google/callback
  • http://localhost:51820/auth/google/callback

"App not verified" warning

This is normal for personal projects. Click "Advanced" → "Go to BlackBook (unsafe)" to proceed. This warning appears because the app isn't published publicly.

Multiple Google Accounts

BlackBook supports connecting multiple Google accounts. Each account syncs separately, and you can choose which contacts/calendars to display.