Preparing Gmail Account
To configure your company Gmail for AGSync Gmail administrator should complete a number of steps. We need to create special account that is able to provide API access and impersonate as all users involved in the sync process. This account is accessed via special API access keys.
Step 1
Log into the Google Developers console as Google apps domain administrator.
So go to https://console.developers.google.com/projectselector/permissions/serviceaccounts
Create a project. We recommend you to call the project AGSync
And press “Create”. This may take a while:
- If if fails, you may need to enable Google Cloud Platform by at https://admin.google.com/ac/appslist/additional and then re-try the project creation.
Step 2
Go to Home->IAM Admin->Service Accounts and choose Create Service Account:
Finally list of service accounts appears:
New service account with unique name (in this case it is:
agsync@agsync-307309.iam.gserviceaccount.com
) has been created.
Step 3
Create Service Account Key:
Key type P12
, Create:
It is working for a while:
And then downloads a file:
You need to save it somewhere – it will later be needed to configure AGSync connection.
Go back to the list of Service Accounts and choose Manage Details for a new account:
Write down service account email address – it will be needed later. I.e. in our case it is: agsync@agsync-307309.iam.gserviceaccount.com
Now we need to enable delegation for new service account.
Tick Enable G Suites Domain-wide Delegation checkbox and define product name for consent screen (i.e. agsync).
After pressing Save copy Client ID for later use (in our case it is 102968100623716713154):
So, as a result of this step we recorded two things:
-
Service Account email address: agsync@agsync-307309.iam.gserviceaccount.com
-
Client ID: 102968100623716713154
-
Downloaded file agsync-307309-0abd09836e88.p12 saved to desktop.
We will need them later.
Step 4
You need to enable following 4 APIs: Calendar API, Contacts API, Gmail API and Tasks API for the service account.
Go to Home->API & Services->Dashboard:
Click Enable APIs and Services:
Choose Google Calendar API:
And enable it:
Now repeat the same for Contacts API, Gmail API and Tasks API (i.e. return to Home->API & Services->Dashboard, choose Enable APIs and Services, find and enable each of the APIs).
Finally the list of enabled APIs should at least contain following 4 items:
Step 5
Now go back to Admin console:
https://admin.google.com/AdminHome
Choose Security:
Scroll down and choose API Controls:
Now choose Manage Third-Party App Access:
Choose Configure new app->OAuth App Name or Client ID:
Search an app by Client ID recorded earlier:
Tick Trusted:
Finally, press Configure.
If everything is OK then Authorized API client now appears in the list:
Step 6
Final step is to use collected information in the AGSync connection settings.
All we need for connection is Service account email and an Account Key collected on the Step 3: