Getting OAuth 2.0 client ID and secret for Gmail

This topic explains how to obtain OAuth 2.0 client ID and secret for the Sage CRM features that need to authenticate against Gmail to access a mailbox.

  1. Make sure that less secure app access is disabled in the Google account that owns the Gmail mailbox for which you are configuring OAuth 2.0.

    You can disable less secure app access in the security options of the Google account.

    For more information, see Less secure apps & your Google Account in Google Account Help.

  2. Sign in to Google Cloud Platform, go to APIs & Services, and create a new project.
  3. Go to OAuth consent screen, select External, and click Create to create an app.
  4. On the OAuth consent screen step, fill in the required fields, then save and continue.
  5. On the Scopes step, add the openid scope, then save and continue to complete the remaining steps.
  6. Go to Credentials and obtain client ID and secret: 
    1. Click Create credentials to select OAuth client ID.
    2. In Application type, select Web application.
    3. Provide an informative name for your application.
    4. In Authorized redirect URIs, add the following URI:

      http://localhost/<install name>/custompages/oauth/callback.html

      Where <install name> is the name of your Sage CRM installation. It must be all lowercase.

      Use https:// if your installation is configured to use HTTPS.

    5. Click Create.
    6. Copy the client ID and secret that display and store them in a file.

Use the obtained client ID and secret to enable OAuth 2.0 for the Gmail mailbox in Sage CRM.