Skip to main content

Defining Settings for Google Calendar Integration

Last updated: Mon, 30 Sep 2019 18:03:58 GMT
iOFFICE Knowledge Center

Defining Settings for Google Calendar Integration

Use the following procedures to integrate your iOFFICE site with Google Calendar.

Access Calendar API

  1. Access the Google Console using the following URL.
  2. Access Google's API library and select the Calendar API option.

     Access Calendar API

Create a New Project

  1. Click the Create a Project button in the top-right corner of the Google Calendar API screen to create a new project in Google Console. This project will serve as the hub that connects Google Calendar to iOFFICE.
  2. (Optional) If you want to select an existing project, click the Select button on the Dashboard screen. Follow the prompts to select the project and proceed to the next section. Otherwise, proceed to step 3.
  3. Click the Create button to continue adding a new project.

    Create new project
  4. Enter a name for your project in the Project Name field.
  5. Click the Create button to create the project.
  6. Click the Enable button to enable the Calendar API for the new project. 

Create a Service Account and Private Key

  1. Access the Service Accounts screen using the following URL.
  2. Click the Create Credentials button and select the Service Account Key option.
  3. Select the Furnish a new private key check box.
  4. Download the credentials as Json.

    Important! - Use caution as you can only do this one time.
  5. Confirm the G Suite Domain-wide Delegation check box is cleared. This setting determines whether the Service Account has access to user calendars (we want to limit the scope to only those space resources required for the integration).
  6. Define settings for the web client (simply name it and leave the restrictions as blank).

    Note: On the Oauth 2 Consent screen, the Web Client key can be redownloaded but does not contain all the information needed. The credentials can also be recreated at the following URL.

  7. Access the Domain Verification screen of the Credentials tab using the following URL.

    The Domain Verification screen displays.

    Add domain button - Google Calendar.png

  8. Click the Add Domain button. The Configure Webhook Notifications window displays.

    Configure URL - Google Calendar.png

  9. Enter your domain in the Domain field using the following format.

    https://(YOUR SITE URL)/external/api/google-calendar/subscriber/

    For example, would be entered as

  10. Click ADD DOMAIN. The Verify Ownership window displays.

    Verify Ownership window - Google Calendar.png

  11. Click TAKE ME THERE to continue to the Webmaster Central screen.

  12. Click the Add a Property button on this screen and re-enter your URL in the same format used in step 9 (https://(YOUR SITE URL)/external/api/google-calendar/subscriber/).

    Add a Property - Google Calendar.png

  13. Click the Continue button. The Recommended method tab and the Alternate methods tab display on the screen.

  14. Select the Alternate methods tab and select the HTML Tag option button.

    Copy string - Google Cal.png

  15. Copy the string between the quotation marks in the "content" attribute, as highlighted in the example above. This string is unique to your site.

  16. In a new browser tab or window, navigate to the Reservation Preferences screen in the iOFFICE application by selecting Admin → Reservations → Preferences.

  17. In the Sync to Google Calendar section, enter the copied string in the Google Endpoint Validation Token field. You may need to select the Sync to Google Calendar check box to display this field.

    Note: Google uses the endpoint validation token to confirm you are the owner of the property only. All ongoing communications are handled using OAuth 2.0 authentication.

    Endpoint Validation field - iOFFICE GCal.png

  18. Click the Save button on the Preferences screen and return to the tab containing the Webmaster Central screen.

    Note: The HTML token must be saved prior to completing the verification process on the Webmaster Central screen. 

  19. Click the Verify button to complete the verification process. Your site is verified and the Service Account/Private Key setup is complete.

Example of Service Account Credential
    "type": "service_account",
    "project_id": "gcaltest2-154018",
    "private_key_id": "~~~~",
    "private_key": "-----BEGIN PRIVATE KEY-----\n~~~~\n-----END PRIVATE KEY-----\n",
    "client_email": "",
    "client_id": "~~~~",
    "auth_uri": "",
    "token_uri": "",
    "auth_provider_x509_cert_url": "",
    "client_x509_cert_url": ""
Example of WebClient Credential

G suite admin tasks

Defining API Scopes
  1. Go to your G Suite domain's Admin Console and select Security from the list of controls. If you do not see Security listed, select More Controls from the gray bar at the bottom of the page, and then select Security from the expanded list of controls.
  2. Select Advanced settings from the list of options.
  3. Select Manage API client access in the Authentication section.
  4. In the Client name field enter the service account's Client ID.
  5. In the One or More API Scopes field enter the list of scopes that your application should be granted access to (see image below).

    Current Api Scope:
  6. Click the Authorize button.
  7. Share all rooms with the service account, such that it can see the rooms calendar.

Connecting to iOFFICE

  1. Add the service account credentials to iOFFICE in the center preferences.
  2. Add the Google Calendar resource address to the room in iOFFICE.
  3. Your Account Manager will then run the GoogleServerSubscriber such that all rooms tied to the center have a "watcher" assigned to them.

Defining External Calendar Sharing Settings

To share room resources with the Service Account, your external sharing settings must be defined to allow for sharing with external calendars. Use the following procedure to allow communication with the Service Account.

  1. Select Apps → G Suite → Settings for Calendar from the Google Admin menu.

    Google Admin - Calendar option.png
  2. Select the Sharing settings option. The Sharing Settings screen displays.

    Sharing Settings screen - Google Admin.png
  3. Click the Edit button - Google Admin.png (Edit) button corresponding to the External sharing options for primary calendars option. 
  4. Select the Share all information, and allow managing of calendars option.

    External sharing settings - Google Admin.png

    Note: This setting is the baseline rule that provides you with the option to grant access to individual resources. It does not impact existing privileges on user calendar resources or room resources. By default, these resources are still not shared outside of the domain.  
  5. Click Save to confirm your selection and save the new setting. The setting is saved and you can now allow Service Account access to room resources as needed.
  • Was this article helpful?