Skip to content

Instantly share code, notes, and snippets.

@rhyskentish
Created October 4, 2019 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhyskentish/1d2bee05fee789ee4fbabf9d5c9fc210 to your computer and use it in GitHub Desktop.
Save rhyskentish/1d2bee05fee789ee4fbabf9d5c9fc210 to your computer and use it in GitHub Desktop.
function generateGoogleToken() {
// This will prompt a dialogue to allow cGOA access to see drive
DriveApp.getFileById(‘YOUR_FILE_ID’)
var propertyStore = PropertiesService.getScriptProperties();
// service account for play console
cGoa.GoaApp.setPackage (propertyStore ,
cGoa.GoaApp.createServiceAccount (DriveApp, {
packageName: 'PlayConsole',
fileId:‘YOUR_FILE_ID’,
scopes : cGoa.GoaApp.scopesGoogleExpand (['androidpublisher']), // play store scope
service:'google_service'
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment