User:Lsloan/sandbox


 * 1) Go to the Google apis console
 * 2) If this is your first time, click "Create project...". Otherwise, click on the drop down under the "Google apis" logo at the top left, and click "Create..." under "Other projects".
 * 3) Click on "API Access", and then on "Create an OAuth 2.0 Client ID...".
 * 4) Enter a product name and click "Next".
 * 5) Select "Service Account" and click "Create client ID".
 * 6) Make note of the "Email address" shown under "Service account". It will be used later by the application configuration.
 * 7) Click "Download private key" and close the window. Save the private key in a secure place.
 * 8) Click "Services" in the left-side navigation, find the "Admin SDK" service in the list on the right, and click on its "Off" button until it becomes a green "On" button. Do the same with the "Groups Settings API" service.
 * 9) Unlike other services, these services need to have a special user permitted to use them. To create a special "Super Admin" user for this purpose:
 * 10) Go to the Google Admin site.
 * 11) Click on the icon for "Users".
 * 12) In the "Filters" column on the right of the page, expand the "Google Admins" section, then click on the "MCommunity Drivers" item.
 * 13) On the left side of the page, you need to choose a user to specify in the app. If none exists, you should create one with a "Super Admin" role.  This user's email address will be used in the application configuration later.
 * 14) Manage OAuth key settings:
 * 15) Go to https://admin.google.com/SetupOAuth
 * 16) Check the box for "Enable this consumer key" in the "OAuth consumer key" section for the domain (e.g. "collab.its.umich.edu")
 * 17) Check the box for "Allow access to all APIs" in the "Two-legged OAuth access control" section.
 * 18) Click the "Save changes" button
 * 19) Manage API client access:
 * 20) Go to https://admin.google.com/ManageOauthClients
 * 21) In the "Client Name" field, enter the service account ID (not the email address)
 * 22) In the "One or More API Scopes" field, enter exactly this string: https://www.googleapis.com/auth/admin.directory.group,https://www.googleapis.com/auth/apps.groups.settings
 * 23) Click the "Authorize" button
 * 24) In the file_name_here .properties file, specify these values, from above:
 * 25) google.user=Super Admin user email address
 * 26) private.key.filename=filename of the downloaded private key
 * 27) account.id=Service Account email address
 * 28) application.name=an informative name which will appear in logs, like "mcomm-webapp/1.0"

Graph example
From: https://en.wikipedia.org/wiki/Photovoltaics#Economics