google-apps-script-api

How to authorize scope for GAS to edit Google Spreadsheets

♀尐吖头ヾ 提交于 2020-04-16 03:12:08
问题 I have a Powershell script that calls a Google App Script function. When I run the Powershell script I can see the following error on the Error Reporting on my GCP project: Exception: You do not have permission to call SpreadsheetApp.getActiveSpreadsheet. Required permissions: (https://www.googleapis.com/auth/spreadsheets.currentonly || https://www.googleapis.com/auth/spreadsheets) at toSpreadsheet (Código:3) at fromPS (Código:14) I have understood that I have to authorize the scope, so I've

REST API failure: Invoke-WebRequest : 404

半腔热情 提交于 2020-04-15 17:18:17
问题 The Powershell code bellow writes and reads values to Google Sheets (works fine) and should run the function myfunction in an Apps Script project using API, but Invoke-WebRequest returns the error bellow: Invoke-WebRequest : 404. That’s an error. The requested URL /v1/scripts/=ya29.a0Ae4lvC3k8aahOCPBgf-tRf4SRFxdcCE97fkbXLAJqZ4zRCLnBp9prwEcBYBAf lYP6zyW3fLeD3u4iSw5jYtDAdgZiSsTjzQbCpj9e_ahCA0xwC_1NBTjYkPwqFdLli7LNpfFcuedFDhdUpfnKTRZdbBWIf2ZyxyuGc6p was not found on this server. That’s all we

REST API failure: Invoke-WebRequest : 404

我只是一个虾纸丫 提交于 2020-04-15 17:13:23
问题 The Powershell code bellow writes and reads values to Google Sheets (works fine) and should run the function myfunction in an Apps Script project using API, but Invoke-WebRequest returns the error bellow: Invoke-WebRequest : 404. That’s an error. The requested URL /v1/scripts/=ya29.a0Ae4lvC3k8aahOCPBgf-tRf4SRFxdcCE97fkbXLAJqZ4zRCLnBp9prwEcBYBAf lYP6zyW3fLeD3u4iSw5jYtDAdgZiSsTjzQbCpj9e_ahCA0xwC_1NBTjYkPwqFdLli7LNpfFcuedFDhdUpfnKTRZdbBWIf2ZyxyuGc6p was not found on this server. That’s all we

Some posts inserted using Blogger API not displayed on main page

老子叫甜甜 提交于 2020-01-15 09:25:10
问题 I am using Blogger API to insert posts. Go through the following blog to understand the problem: Link: https://post-testing123.blogspot.com/ In this blog I have 7 posts: 5 posts with title of format 'Title #no'- are created with API request. 2 posts with title of format 'Manual #no'- are created manually. Manual posts were created before API posts. In this blog, I have set the number of posts to be displayed on the main page to 3. So, on main page 3 out of 5 posts created with API are visible

How to programmatically create a list of Google Apps Script projects owned by me?

你说的曾经没有我的故事 提交于 2020-01-11 07:47:09
问题 Google Apps Scripts projects could be standalone, bounded to Google apps (Docs, Sheets), Web Apps or Google Sites gadgets. How could I find all the projects owned by me from a single point? The Class File, Class Document, Class Spreadsheet, Class Slide and Class Sites from Apps Script doesn't include a method to know if the corresponding container has a Script project bounded to them. Only standalone Script projects are shown in Google Drive. Update: Nowadays (2018) it's possible to find all

Google Apps Script - Deploy as web app - now requires me to “Share” the the code

醉酒当歌 提交于 2020-01-01 19:24:08
问题 I recently made a simple change to an google app script - once I re-deployed, you can access whichever page is in the: var t = HtmlService.createTemplateFromFile('my1'); But any subsequent attempts to open a different html page by clicking a button with a link, will display "Google Drive - Access Denied" / "Google Drive, You need permission..." I tested also, by creating a VERY simple web app, that does not attemp to access any google 'sheets', drive, or any other API, and get the same result

How to use scope “https://www.googleapis.com/auth/script.webapp.deploy”

送分小仙女□ 提交于 2019-12-11 16:49:02
问题 When you add this scope inside oauthScopes section in your appscript.json file: "oauthScopes": [ "https://www.googleapis.com/auth/script.webapp.deploy", ] you will see something like this when you attempt to use the addon: As I understand, this scope will allow the developer to deploy the addon as a web app (a separated web app for each addon user, not the only web app when we Deploy as web app manually in the script editor) My question is how to actually use this scope to "Publish this

“Requested entity was not found.” - Apps Script Execution API error

99封情书 提交于 2019-12-11 08:38:51
问题 We have an Apps Script that is installed in five G Suite accounts. I am invoking the app scripts from the Java code that is being deployed in Google App Engine. I have stored the five refresh tokens in a properties file and set them in GoogleCredential in a round robin fashion before invoking the Apps Script. When I am trying to invoke the Apps Script Requested entity was not found. , an error is returned. But the same refresh tokens and client secrets work fine when I create a simple java

How can I pass an argument to Google App Script API from Python script?

混江龙づ霸主 提交于 2019-12-10 19:46:40
问题 I have an argument SalesID I'd like to pass through to the Google App Script. How can I pass it through with this python script? (Script is from https://developers.google.com/apps-script/api/how-tos/execute) from __future__ import print_function from googleapiclient import errors from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file as oauth_file, client, tools def main(SalesID): """Runs the sample. """ SCRIPT_ID =