This describes how to authenticate with Google Datastore using Goa along with a service account, as described in Oauth2 for Apps Script in a few lines of code (which you should read first for background) and Goa services and customization The library, cGoa, is available under this project key. MZx5DzNPsYjVyZaR67xXJQai_d-phDA33 Setting upYou'll need to create an App. The dashboard/developers console can be found here. This time, its a service account that's required. Your one time setup would look something like this. In this case - a service account, the credentials come from the JSON file downloaded from the Google developer console and identified by the given file id. cGoa.GoaApp.setPackage (propertyStore , cGoa.GoaApp.createServiceAccount (DriveApp , { packageName: 'DriverDatastore_serviceaccount', fileId:'0xxxxxxxxs', scopes : cGoa.GoaApp.scopesGoogleExpand (['datastore','userinfo.email']), service:'google_service' }));; The example
|
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > OAuth2 for Apps Script in a few lines of code >