Setting Up Google OAuth to Access Gmail for Email Bounce Processing: A Step-by-Step Guide

Knowledge Base

Introduction

Google announced the phase-out of Less Secure Apps (LSA) authentication, affecting users who use Gmail to receive their bounce notifications. Connecting to a Gmail account must now be done using Google OAuth. This guide will show you how to configure Google OAuth to access your Gmail mailbox.

Step 1: Create a New Project

  1. Go to the Google Cloud Console:
    Open Google Cloud Console (https://console.cloud.google.com/).
  2. Create a New Project:
    • Click on the project drop-down in the top left corner.
    • Select New Project.
      New Project Click
    • Enter a project name and select a billing account if required.
      New Project Create
    • Click Create.

Step 2: Enable Gmail API

  1. Select Your Project:
    Ensure your new project is selected in the project drop-down.
  2. Navigate to APIs & Services:
    • Click on the Navigation menu (≡) in the top left.
    • Go to APIs & Services > Library.
      Select Library
  3. Enable Gmail API:
    • Search for “Gmail API”.
    • Click on the Gmail API result.
      Gmail API Select
    • Click Enable.
      Gmail API Enable

Step 3: Create OAuth Consent Screen

  1. Navigate to OAuth Consent Screen:
    • Go to APIs & Services > OAuth consent screen.
  2. Configure the Consent Screen:
    • Select External if you are not part of an organization.
    • Click Create.
  3. Fill Out App Information:
    • Enter the App nameUser support email, and other required fields.
    • Further down the same page, enter the Developer contact information
    • Click Save and continue.

Step 4: Configure OAuth Consent Screen Scopes

  1. On the next screen Add Scopes:
    • Under the Scopes section, click Add or Remove Scopes.
    • Filter for Gmail API
    • Add the necessary Gmail API scopes, e.g., https://www.googleapis.com/auth/gmail.readonly if you are not going to delete the messages or the one below if you will be deleting messages
    • Click Save and continue.

Step 5: Add Test Users

Depending on the scopes you choose, some may be restricted. Since the application will not be published and will stay in ‘Testing’ status, only authorized users will be able to connect to it.

  1. Add Test users
  2. Click on Add
  3. Then Click on Save and Continue

Step 6: Create OAuth Credentials

  1. Navigate to Credentials:
    • Go to APIs & Services > Credentials.
  2. Create OAuth Client ID:
    • Click Create Credentials
    • and select OAuth client ID
  3. Configure the OAuth Consent Screen:
    • Select the application type, e.g., Web application.
    • Enter a name for your OAuth client.
    • From your Interspire screen, retreive the OAuth callback URL
    • Add it to Authorized redirect URIs:
  4. Generate Client ID and Secret:
    • Click Create.
    • Note down the Client ID and Client Secret for later use.

Step 7: Enter the OAuth 2.0 Credentials in Interspire Email Marketer

  1. Enter the email addess that will receive the bounces:
  2. Enter the Credentials in Interspire Email Marketer:
  3. Click on the Google OAuth Sign-In button
  4. Go through the Authentication Screens
    • Select the account to use for authentication
    • Complete the Sign-in process
    • Click on Continue as the application is in ‘Testing Mode’
    • Click Continue to accept to sign-in
    • Select the Check box to allow access to Gmail
    • Click Continue
  5. Your instance of Interspire is now Authenticated to your Gmail Account

Conclusion

Configuring Google OAuth can be a little involved, in particular that the source documentation is rather confusing. Hopefully the step-by-step guide above will have allowed you to configure Google OAuth to access Gmail for bounce processing in conjunction with Interspire Email Marketer.

Scroll to Top