Google

The apps within the G Suite are comprised mostly of cloud-based productivity software—Google Calendar for appointments, Google Drive for file storage and collaboration, and so on. With Skuid’s data source types, you can access these cloud applications and use their data alongside the rest of your data—perhaps incorporating the shared calendars of employees into business pages.

Before you begin, you’ll need to work within Google’s API Manager to enable API usage for your applications and obtain the API credentials you’ll be using for your authentication providers. Follow the instructions below to do this, and then learn how to use your chosen Google data source in the appropriate topic.

Setting up a Google API project for Skuid

To actually use any Google API for a Skuid data source, you’ll need to do the following within the Google API Manager:

  1. Create a project within your Google API Manager
  2. Enable the APIs for your respective services.
  3. Create OAuth credentials

1. Create a project within your Google API Manager

First, create a project that will house your API credentials and enabled APIs.

  1. Navigate to the Library tab of Google API Manager.
  2. Click Project > Create project in the header bar.
  3. Enter a name for your project, such as Skuid Data Sources.
  4. If this is the first API project you’ve created, choose if you would like email updates from Google and accept Google’s Terms of Service.
  5. Click Create.

2. Enable the APIs for your respective services.

Google does not automatically enable all of its APIs for any project. Instead, you must individually enable each API you wish to use.

  1. Navigate to the Library tab of your project.
  2. Begin typing the name of an API you wish to enable, such as Drive.
  3. Click the name of the API.
  4. Click Enable.

You may disable your APIs at any time, as well as view traffic, errors, and other metrics from the individual API pages in your Library tab.

3. Create OAuth credentials.

OAuth is an open source standard for authentication, and by far the simplest way to authenticate to Google for your API uses. During this process, you’ll create a set of credentials—a client ID and a client secret—that will verify to Google that your Skuid data source can access your API project.

  1. Navigate to the Credentials tab of your project.
  2. Click Create credentials.
  3. Choose OAuth client ID.
  4. For Application type, select Web application.
  5. Enter an appropriate name, such as Skuid OAuth.
  6. For Authorized redirect URIs, enter the redirect URI (also known as callback URL) for your Skuid site. For more information on how to form your redirect URI, see Callback URLs/Redirect URIs for OAuth 2.0 Authentication.
  7. Click Create.

After doing this, Google will create and display your client ID and client secret. Think of these like a username and password, and protect them as such.

You will use these credentials when setting up the authentication provider for your data sources. You can access your credentials at any time by clicking on your credentials within the Credentials tab.

Set up your Google authentication provider in Skuid

Thanks to Skuid’s pre-configured data source types, you can actually use a single authentication provider for any Google data source. To use the OAuth 2.0 protocol—which allows individual end users to authenticate directly with Google—you must provide the API client ID and client secret from your Google project:

  1. Navigate to Configure > Data Sources > Authentication Providers.

  2. Click New Authentication Provider.

  3. Fill out the necessary fields:

    • Name: Enter a unique name, such as GoogleAuth.

      Note

      The name for the data source must not have spaces. Spaces in the data source name may cause unexpected behaviors.

    • Authentication Method: OAuth 2.0 / OpenID

    • Provider Type: Google

    • Grant Type: Authorization Code

    • The Authorize and Token Endpoint URLs will be set automatically by the provider type.

    • Default Scopes: Scopes are typically auto-filled for both Google Calendar and Google Drive. To use an authentication provider for only one service, or if you see issues, ensure this field matches the following values:

      • For Google Drive data sources: https://www.googleapis.com/auth/drive
      • For Google Calendar data sources: https://www.googleapis.com/auth/calendar

      Note

      If using the same authentication provider for Drive and Calendar, separate these scopes with a space, not a comma.

    • Client ID and Client Secret: Enter the respective credentials for your Google project

  4. Click Save.

  5. If Skuid asks you to create a Remote Site Setting, click OK.

With your authentication provider in place—which tells Google that you have permission to access data—you can now create a new data source to actually obtain that data.