Google Spreadsheets Data Provider 2015 - Online Help
Google Spreadsheets Data Provider 2015
Questions / Feedback?

Using OAuth

You can authorize the driver to access Google spreadsheets on behalf of individual users or on behalf of a Google Apps domain.

ClientLogin has been officially deprecated since April 20, 2012 and is now no longer available. Use OAuth to connect to Google Spreadsheets.

Additionally, set the Spreadsheet to the name or feed link of the spreadsheet you want to connect to.

Using a User Account to Connect to Google Spreadsheets

OAuth requires the authenticating user to interact with Google Spreadsheets using the browser. The driver facilitates this in various ways as described below.

You can connect with the embedded credentials of the driver or you can register your own app.

Register Your Application

Follow the steps below to obtain the credentials for your application:

  1. Log into the Google API Console.
  2. Click Create Project or select an existing project.
  3. In the API Manager, click Credentials -> Create Credentials -> OAuth Client Id -> Other.
  4. Click Create. The OAuthClientId and OAuthClientSecret are displayed.
  5. Click Library and enable the Drive API.

Authenticate to Google Spreadsheets

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set this to the client Id in your app settings.
  • OAuthClientSecret: Set this to the client secret in your app settings.
  • Spreadsheet: Set this to the name or feed link of the spreadsheet you want to connect to.
When you connect the driver opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The driver then completes the OAuth process.

Using a Service Account to Connect to Domain-Wide Data

To connect to Google spreadsheets on behalf of users in your Google Apps domain, use a service account. In the service account flow, the OAuthAccessToken authenticates that the driver is authorized to access the scopes granted to the service account. The driver exchanges a JSON Web token (JWT) for the access token. A private key is required to sign the JWT. You generate the private key during app registration.

Register Your Application

Follow the steps below to obtain the credentials for your application:

  1. Log into the Google API Console.
  2. Click Create Project or select an existing project.
  3. In the API Manager, click Credentials -> Create Credentials -> Service Account Key. In the Service Account menu, select New Service Account or select an existing service account. In the Key Type section, select the P12 key type.
  4. Click Create. The key pair is downloaded and the private key's password is displayed.
  5. Click Library and enable the Drive API.

Authenticate to Google Spreadsheets

After setting the following connection properties, you are ready to connect:

  • OAuthJWTCertType: Set this to "PFXFILE".
  • OAuthJWTCertPassword: Set this to the password of the .p12 file.
  • OAuthJWTCertSubject: Set this to "*" to pick the first certificate in the certificate store.
  • OAuthJWTIssuer: Set this to the email address of the service account.
  • OAuthJWTCert: Set this to the path to the .p12 file.
  • OAuthJWTSubject: Set this to the email address of the user for whom the application is requesting delegate access. Note that delegate access must be granted by an administrator.
  • Spreadsheet: Set this to the name or feed link of the spreadsheet you want to connect to.
When you connect the driver completes the OAuth flow for a service account.

 
 
Copyright (c) 2016 CData Software, Inc. - All rights reserved.
Build 15.0.6124.0