Skip to main content

Gmail OAuth

in Emails
Authors list
Published: 23 Nov 2022|Last updated: 3 Feb 2023

Follow the steps below to set up Deskpro to read your G Suite or Gmail account through Google OAuth.

Create a new project

Log in to your Google API Console account. Make sure to log in with your G Suite administrator account or you may have trouble.

https://console.developers.google.com/

Once logged in, click on Select a Project - this will open up a window with any existing projects you have. For the purposes of this tutorial, we advise you create a New Project here. image.png

In the next step, define a project name. This is just a placeholder, so you are free to define anything. Your organization/location can also be left as default unless you require something specific. Then press Create. image.png

The project you've just created may be selected by default, if not, select your project from the drop down list. image.png

Note


Ensure you are working inside the correct project before this next step.

Enabling the Gmail API

Next, search specifically for "gmail" in the search bar at the top of the page. The first result found should be Gmail API. Select this. image.png

Once the Gmail API configuration is open, you will want to Enable this API. image.png

You may find this action takes a few minutes to complete. Please wait until the API shows as enabled.

Creating OAuth Consent Screen

Within the APIs & Services menu, select OAuth consent screen. You will be given the option to choose either Internal or External. Select the Internal option and click Create image.png

In the App information page, you must specify the following information.

  • App name - A name for the OAuth application. This is just a placeholder, so you are free to define anything.

  • User support email - An email address for users to contact someone who can provide support. Usually a GSuite Administrator.

  • Authorized domains - This is the top private domain that the app will run on, so if your helpdesk is at support.example.com, you will need to add the domain example.com

  • Developer contact information - An email for Google to contact you if any changes must be made. Usually your email address. image.png

Once complete, click Save and Continue.

You do not need to apply any Scopes, so click Save and Continue

Finally, click Back to Dashboard to complete the OAuth consent screen.

Creating OAuth Credentials

After the consent screen is configured, you can now create a set of credentials. Ensure you are in the Credentials menu, click Create Credentials and select OAuth Client ID. image.png For the Application type, select Web Application, and the rest of the form should display. image.png If you want, you can change the Name of the OAuth client ID to something you would recognise, but you must specify the Authorized redirect URIs. This will be your helpdesk URL followed by /admin-api/gmail/token i.e:

https://support.example.com/admin-api/gmail/token
copy

image.png Click Create to create the OAuth Client ID.

This will then display a pop-up window containing Your Client ID and Your Client Secret. Make a note of those as you will need to use them later. image.png

Configuring Gmail OAuth in Deskpro

Within your Deskpro Helpdesk, go to Admin > Channels > Emails > Accounts, and select New to add a new email account.

Enter your email address in the Email Address field, then select Gmail or Google Apps as the Account Type image.png Select OAuth as the Authentication method, then click Get Access Code to open the OAuth client prompt. image.png Enter your Client ID and Secret from earlier into the fields provided, and click Save image.png

A pop-up window will now show asking you to choose the account you want to login as. Select Use another account and enter the credentials for the email account you wish to monitor.

You will then be asked to allow access to your email account. Confirm the email address you are adding is correct, then click Allow. image.png The window should now close, and the Access Code field should be populated with your access code. Click Create at the bottom of the page to create your email account and start monitoring the inbox.

HelpfulUnhelpful
next pageSet up Deskpro Messenger
previous pageOffice365

Please log in or register to submit a comment.