ampEducator | Google API - Sign In & Gmail Setup Guide

Modified on Thu, 22 Feb 2024 at 01:38 PM

Question: How do I send emails from my Google Gmail Workspace managed email domain instead of the built-in software email provided by ampEducator?


Note: In order to track email you must first configure Google Sign In as well. You can use Google Sign In without configuring Google Gmail. You must have Google Workspace Admin User access to https://admin.google.com and ampEducator Admin User Role assigned.


Answer: ampEducator can allow users to sign in to their ampEducator account using their Google Workspace account as well as tracking (send & receive) email to Prospects and Students via the Google Email API. This authorizes ampEducator to Google Workspace Gmail to allow you to send Prospect & Students emails from your associated @domain.com managed in Google Workspace Gmail.


TABLE OF CONTENTS


Setup Google Sign In:

1. Enable Google API in ampEducator Config

2. Create a "Project" in your Google Cloud Console for your Organization.

3. Create OAuth Consent Screen

4. Create OAuth Client ID Credentials


Setup Google Gmail:


1. Enable Google Gmail

2. Verify your Domain

3. Verify Ownership.

4. Create Service Account

5. Create and Download Service Account JSON Key

7. Enable Domain Wide Delegation and Add Scopes

8. Upload JSON File

9. Enable GMAIL for Email

10. Verify Email for each User


1. Enable Google API in ampEducator Config


a. Under Institution Config / General > Google API


i . Google API Enabled Click "Yes"


b. Click Save.




2. Create "Project" in your Google Cloud Console for your Organization.


Note: If this is your first time using the Google Cloud Platform you will need to Select your Country and Agree to the Terms of Service.


a. Go to https://console.cloud.google.com login as an Admin User.


Configuration Tip: Ensure that you are logged out of any other active sessions with any other Gmail Account in your browser before attempting this configuration. You should close and quit the browser and/or not used saved passwords or password management tools as this may confuse which session is being authorized with Google during the process when you attempt to configure these sections. It is best to manually select the User Account and type in and view each password to verify the correct login is being used as Admin User.


b. "Create New Project" Project Name = ampEducator


Note: Both Google Sign In and Google Gmail must be created under the same Project. Do not create a new Project for each separately.


Each Organization that you are an Admin for will be displayed in the pulldown at the top right next to Google Cloud logo. If this is your first time, you will need to CREATE PROJECT under the Organization otherwise please ensure you are selecting the right Organization for the association domain name you wish to Google to authorize in your ampEducator account.




Remain logged in to https://console.cloud.google.com as an Admin User.


a. To the left you will notice a menu. Click on "OAuth consent Screen" and select "User Type = Internal" from the options.


b. Click "Create"


c. App Name = "ampEducator"


d. Support Email = "your email"


e. Logo File = Not Required, Skip


f. Under Application Privacy Policy link enter the following:

http://www.ampeducator.com/privacy.php


g. Under Application Terms of Service link enter the following:

http://www.ampeducator.com/privacy.php


h. Under Authorized Domain(s) enter the following:


Check to see which PURL (Personal URL) ie. https://yourschoolname.ampeducator.com you account is using. Canadian clients are assigned to a .CA rather than .COM domain and if you are using .CA then ensure this matches your ampEducator PURL with .CA in this field.


i. If your PURL is .CA then enter Authorized domain 1:

ampeducator.ca

ii. If your PURL is .COM then enter Authorized domain 1:

ampeducator.com


If you are unsure, you can simply add both as shown below and click "+ ADD DOMAIN"

Note: Avoid using form autofill as this may cause you to get an error, if this happens - then simply remove the domain and start over and ensure you type in the domain or copy and paste from above.


i. Developer Contact Information: your email address


j. Click - Save and Continue


k. Add Scopes - None (not required)


l. Click - Save and Continue


m. Click - Back to Dashboard


4. Create OAuth Client ID Credentials


Remain logged in to https://console.cloud.google.com as an Admin User.


a. To the left you will notice a menu - click on "Credentials"


b. Click on "+ CREATE CREDENTIALS"


c. Select "OAuth Client ID":



d. Choose Web Application Type = Web Application


e. Name = ampEducator


f. Add Authorized Javascript origins = None


g. Add Authorized Redirect URI


IMPORTANT: Make sure that you are using your PURL (Personal URL) ie. the website URL that you use to login to ampEducator ie. https://yourschoolname.ampeducator.com. Canadian clients as of 2018 can request or may be assigned to a .CA rather than .COM domain and if you are using .CA then ensure this matches your ampEducator PURL exactly. If you are not sure simply cut PURL in bold red below and paste in your subdomain used to login to ampEducator:


For most Canadian Clients .ca is used (~ 2018 or newer)

https://PURL.ampeducator.ca/web/public/authenticate/google 


All Other Clients or possibly a legacy Canadian Client still using a .COM based PURL:

https://PURL.ampeducator.com/web/public/authenticate/google


h. Click Create.


i. Copy Client ID 



j. Paste into ampEducator Institution Config / General / Google API / Google Sign In / OAuth Client ID:




k. Copy Client Secret, To find Client Secret, go to Edit OAuth Client:




l. Click Copy Client Secret



m. Paste into ampEducator Institution Config / General / Google API / Google Sign In / OAuth Client Secret.



n. Click Save.


o.  If successful, your Google API Sign In config will prompt you as updated:





Google API - Google Gmail


1. Enable Google Gmail


a. Under Institution Config > General > Google API > Google Gmail = Yes


b. Click Save


2. Verify your Domain


a. Go to the Google Search Console at https://search.google.com/search-console


b. Add Property and select Property Type "URL Prefix". Under URL Prefix Enter URL shown below:




Under URL Prefix Under  Institution Config > General > Google API > Gmail API instructions find your URL Prefix and copy and paste into this section:


IMPORTANT: Make sure that you are using your PURL (Personal URL) ie. the website URL that you use to login to ampEducator ie. https://yourschoolname.ampeducator.com. Canadian clients can request or may be assigned to a .CA rather than .COM domain and if you are using .CA then ensure this matches your ampEducator PURL exactly. If you are not sure simply cut PURL in bold red below and paste in your subdomain used to login to ampEducator:


For most Canadian Clients .ca is used (~ 2018 or newer)

https://PURL.ampeducator.ca/web/public/email/push


All Other Clients or possibly a legacy Canadian Client still using a .COM based PURL:

https://PURL.ampeducator.com/web/public/email/push


c. Click Continue.


3. Verify Ownership.


a. Select HTML Tag and open your ampEducator Config and copy the meta tag (Do Not Click VERIFY yet)





b. Paste the Domain Verification Tag into the text area in ampEducator Config and Click "Save", you will see a prompt for Google API config was successfully updated:



c. Return to the Google Search Console and click "VERIFY":



d. Google will Verify your domain ownership, Click "GO TO PROPERTY"



4. Create Service Account


a. Go to https://console.cloud.google.comFrom the Navigation Menu go to "IAM & Admin"


b. Click on "Service Accounts"


b. Click on "+ Create Service Account"


d. Service Account Details 


i. Service Account Name = ampEducator Email


ii. Service Account ID = automatically generated


iii. Service Account Description = Not Required, Skip


e. Click "Create and Continue"


f. Grant this service account access to a project. Select Role = Owner



g. Click "Continue"


h. Grant users access to this service account (optional) = Not required, Skip


i. Click "Done"


5. Create and Download Service Account JSON Key


a. In Google Console - https://console.cloud.google.com go to Navigation Menu / APIs & Services / Credentials



b. Edit the Service Account by Clicking on the Pencil Icon to right or the Name



c. Click on "KEYS" section


d. Select "ADD KEY" pull down menu and select "Create New Key"




e. Select radio button "JSON" and Click "CREATE":



f. IMPORTANT. Note the Location of the downloaded file on your computer as you will need to upload it later to ampEducator in STEP 8, click CLOSE.




6. Enable APIS and SERVICES


a. From the Navigation Menu go to APIs & Services. Under Enabled APIs & Services click "+ ENABLE APIS AND SERVICES"




b. Search for "gmail api" and click the result:



c. Click on "Gmail API"



d. Click "ENABLE" for Gmail API:



e. Return to Enable APIs and Services and search for "cloud pub/sub api" and click on the result



f. Click "ENABLE" Cloud Pub / Sub API




7. Enable Domain Wide Delegation and Add Scopes


a. Go to https://console.cloud.google.com


b. Click on "IAM & Admin".


c. Click on "Service Accounts".


d. Click on "Service Account" and scroll down to Expand "Advanced Settings" by clicking on the down Arrow:



e. Copy Client ID and them Click "VIEW GOOGLE WORKSPACE ADMIN CONSOLE"



f. Go to https://admin.google.com and click on Security / Access and Data Control / API Controls / MANAGE DOMAIN WIDE DELEGATION



g. Click "Add new"




h. Copy and Paste Client ID saved from "e" above.


i. Copy and Paste OAuth Scopes (comma delimited):

https://mail.google.com/,https://www.googleapis.com/auth/pubsub


j. Click "AUTHORIZE"




8. Upload JSON File


a. Go to ampEducator and upload JSON file you downloaded in Step 6.


b. Click Save.


c. If successful, your Google API Gmail config will prompt you with Service Account Enabled.




9. Enable GMAIL for Email


a. In ampEducator go to Institution Config / General / Email 



b. Scroll down and select "Gmail" from Email Provider List and Click Save.

10. Verify Email for each User


a. Each user can then login and Select Username (top right) / User Account / Email and then under Custom Email it will show as "NO".

b. The user will enter their email address using the domain assigned to the Google Workspace Organization you have configured with your ampEducator account and click "Configure & Test".


c. ampEducator sends a Verification Code to the email which must be entered and the click "Configure & Test":




d. Once successfully Custom Email will show as "YES" and the Last Updated date will be recorded. 






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article