EzeScan Desktop/Server

How to connect IMAP to Gmail

Google API Client Registration

  1. Open Google API Console in your web browser.

  2. Navigate to APIs and Services

    image-20230402-034259.png
  3. Open Credentials page

  4. Click Create Credentials

  5. Select OAuth client ID

  6. Select application type Web application

  7. Enter a name such as EzeScan IMAP

  8. Add the following URLs to Authorized redirect URIs for sign-in from EzeScan Desktop
    http://localhost:5000/oauth/callback

  9. Add the following URL to Authorized redirect URIs for sign-in from EzeScan Server web interface
    http://localhost:32392/api/integrations/oAuthCallback
    Note: left part http://localhost:32392 should be replaced with scheme and authority of the public address (if applicable).

  10. Click Create

    image-20230402-034209.png
  11. Copy the Client ID and Client secret to a safe location

    image-20230402-034612.png

Check IMAP is enabled in Gmail

  1. Open Gmail in your web browser

  2. Open the quick settings panel

    image-20230402-041549.png
  3. Click on See all settings

  4. Select Forwarding and POP/IMAP tab

  5. In the IMAP access section select Enable IMAP

    image-20230402-041919.png
  6. Click Save Changes

IMAP Connection Settings

The following are the connection settings to configure in EzeScan > Workstation Options > Connection Profiles.

image-20230402-035950.png

Option

Value

Server

imap.gmail.com

Port

993

Security Type

Implicit SSL/TLS

Authentication Type

OAuth

Grant Type

Authorization Code

Authorisation Endpoint

https://accounts.google.com/o/oauth2/v2/auth

Token Endpoint

https://oauth2.googleapis.com/token

Scopes

https://mail.google.com/

Desktop Redirect URL

http://localhost:5000/oauth/callback

Client ID

The client id captured when creating the Google API client registration.

Client Secret

The client secret that was captured when creating the Google API client registration.

Username

The email address of the mailbox to import from.

For example, user@gmail.com

Click Sign In button to login to the respective Gmail account.

image-20230402-035819.png

Use the Test Connection button to ensure the connection to Gmail is working.