Configuring OAuth for G-Suite Server


Steps to configure OAth for G-Suite Server:

  1. Log in to console.developers.google.com.
  2. In the dashboard, click Create Project to create a new project.

  3. Enter the Project Name.
  4. For Location, click on Browse and select the parent organization.

  5. In the left panel of the displayed project details page, navigate to APIs & Services -> Library.

  6. From the available list of APIs, select Gmail API and click on Enable. You can use the search option for quicker results.

  7. In the left panel, click on OAuth consent screen and choose the User Type and click on Create.

  8. In the displayed page, provide the Application Name, Application Logo, and Support email of your APM.

  9. Click on Add Scope, choose Gmail API and click on Add.

  10. The scope will be displayed as shown in the below screenshot. Copy the Scope to APM and click on Save.

  11. In the left panel, click on Credentials -> Create Credentials -> OAuth Client ID.

  12. Click on DOWNLOAD JSON to download the file containing the authorization server details. Copy these details to Client Details in APM.
  13. Provide a Name of your choice.
  14. In Authorized Redirect URIs field, copy-paste the Redirect URL of APM and click on Save.

You have now configured G-Suite as the authorization server for your organization using Gmail as the mail server.

Note:
Use the following values to configure OAuth setup for G-Suite:
  • Authorization endpoint URL : https://accounts.google.com/o/oauth2/auth
  • Scope : https://mail.google.com
  • Query Parameters :
    Name - access_type
    Value - offline
  • Token endpoint URL : https://oauth2.googleapis.com/token
  • Token Request Method :Post request body