Updated 20 August 2016
Credit: This tutorial is based off the work and slides originally created by Edwin Vinas, ULAPPH Corporation
From: https://github.com/takbok/shared-contacts-admin click the green "Clone or download" button followed by "Download ZIP". Then Unzip the downloaded ZIP file.
Unzip all files under "shared-contacts-admin-master" folder
-
Note that the ClientID and ClientSecret can be configured on https://console.cloud.google.com
-
Since there are multiple settings to be done in Developers Console and Google Apps, they will be covered separately
-
For now, don't change anything yet on the oauth.go, we will try to compile & upload first to appengine
var ( config = &oauth2.Config{ ClientID: `?????????-??????????.apps.googleusercontent.com`, ClientSecret: `?????????????`, RedirectURL: `ideally-should-be-set-later`, Scopes: []string{`http://www.google.com/m8/feeds/contacts/`}, Endpoint: google.Endpoint, } yeah = "yeah" )### Create an appengine project on https://console.cloud.google.com
Take note of the email address and project ID
After un-zipping the ZIP delete the following three folders:
- tutorial
- video-tutorial
- vendor
See Issue # 9 for background on the reason for deleting the "vendor" folder. #9
Because the "vendor" folder has been removed, some needed golang packages must now down be downloaded. If using Microsoft Windows, follow these steps:
- Ensure the git command is installed on your computer. If needed, you may install from: https://git-scm.com/download/win
- Run "install-packages.bat"
to install the required golang packages.
appcfg.py --application=PROJ_ID --email=EMAIL@EMAIL.COM --no_cookies update shared-contacts-admin-master
This is the one-page web interface of the SCA
This is where you can Import Contacts
This is where you can Export Contacts
This is where you can Delete Contacts
-
As expected, there will be errors when you try the SCA as is...
-
What needs to be done so we can make use of this app?
-
Setup Google Developer Console
-
Setup Google Apps for Work
You must have the Contacts API enabled
Note that an entry was automatically added by Google Apps to enable sharing of contacts
This will appear only after configuring Google Apps
No need to download JSON, just update the oauth.go
You can change it to SCA; Nagitgit is just a sample name
Go to Google Apps http://apps.google.com as admin
Go to Users to configure contacts sharing
Go to admin user
Go to apps list
Go to contacts
Go to advanced settings
Enable contacts sharing
Click to manage service accounts
Click to Edit App Engine service account
Enable the domain-wide delegation
Notice that a new client has been created automatically for the service account
appcfg.py --application=PROJ_ID --email=EMAIL@EMAIL.COM --no_cookies update shared-contacts-admin-master
Go to the Imports section and click Import Contacts
Point to CSV contacts file and Enter Google Apps Domain
Number of records imported will be shown
Go to Exports section and click Export CSV
Enter Google Apps Domain
Double-click on the CSV download item
Contacts successfully exported to Excel
Go to Exports section and click Export CSV
Enter Google Apps domain
Double-click on the XML download item
Contacts successfully exported to XML
Visit Contacts https://contacts.google.com (as admin)
Contacts are now visible on the domain
Visit Contacts https://contacts.google.com (as ordinary user)
Contacts are now visible on the domain
Go to Delete Contacts section
Enter the Google Apps domain
Records were sent for batch delete request