Setting Up Google OAuth and Getting API Keys
Table of Contents:
Setting Up Google OAuth and Getting API Keys
Google API Keys are needed for OAuth logins for a number of 360Works products. These keys can also be used to Access FileMaker Databases using OAuth. This guide will walk you through setting up an OAuth consent screen and getting Google API Keys.
Generate your own keys
First, go to https://console.developers.google.com/. If you do not already have a Google account, you will need to create one. It is highly recommended that if you are setting this up that you go ahead and create a new account with a username and password that you are comfortable sharing with your users/co-workers.
-
Click Create Project.
-
Give the project a name, then click "Create".
-
Now let's set up the OAuth Consent Screen, use the menu in the upper left corner and go to APIs & Services-> OAuth Consent Screen. Make sure that the name of the app you just created is showing at the top of the screen. If it is not, click it and select your app from the list :
-
Click Get Started
-
App information: For App Name, this is arbitrary but it should be identifying to your users. We recommend "360Works Email". For user support email, click the drop-down and select the signed in account. Click Next:
-
Audience: For User Type, Select "External", which will work for anyone with a Google account, but will show a warning that the app is not verified. If you are a G Suite user, you may choose "Internal" here, and avoid the warning, but this will only work for users inside your G Suite account.
-
Contact Information: Enter the logged in user address. Click Next.
-
Finish: Agree to the Google API Services: User Data Policy and click Continue and then Create. This will take you back to the Overview tab.
-
Now we need create the Client ID. From the navigation menu select Clients and then click Create Client:
-
For Application Type select Web Application. For Name, this is just to identify the client id, choose an identifying name ex. MyOAuthClient. Click the Add URI button under Authorized Redirect URIs and add both of the following:
-
Click Create. You should then be shown your credentials. Save these as you will need them for authentication later.
-
Now we need to add users that can access the app. On the menu, click Audience and then Add Users under Test Users
-
Enter in the user's email addresses that will need to authenticate to Gmail and click Save.
-
Now we need to add scopes to the project. First, click the hamburger menu in the top left corner and select API&Services->Enable APIs and Services. On the resulting screen, Click Enable API and Services
-
In the search field, type Gmail, select it from the results, and then click Enable
-
Next we need add GMail to the scopes. Select the OAuth Consent Screen from the navigation menu and then select Data Access. Click Add or Remove Scopes
In the Filter field, type Gmail and then select the scope "https://mail.google.com/" and then click Update and then Save
Once you have completed all of these steps, users should now be able to authenticate with Gmail via the 360Works Email plugin!