0

Before I get into the details, the basic error is that a json response from postman for making requests to the Apps Script API Either returns a success or failure solely depending on the version of the script I have selected as an API executable.

Here are the details:

I am attempting to remotely execute a google apps script function through the API through postman. When publishing a test script that I am using to test our the API functionality as an API executable as a certain version, as seen here:

enter image description here

When making a post request to execute a function which returns nothing from this version of the script, I get the following response: enter image description here

This response doesn't contain an ExecutionResponse object, presumably because my function doesn't return anything. I wanted to see if I could return data, though, so I updated this function to return a simple "helloWorld!" in version two of the script. When re-publishing as an API Executable, this time with version two published:

enter image description here

The postman response is this:

enter image description here

I can confirm that the error is reproducible solely by switching between versions of my script (and whether I've produced new credentials to reflect the API executable change doesn't change the response); that is the only variable changing between the two responses; no matter if I create new credentials after changing the version or not, the same difference in response is produced. What is accounting for the error here?

  • Show your script too. – TheMaster Jun 29 '19 at 06:12
  • Possible duplicate of [Check if user has run it](https://stackoverflow.com/questions/49069853/check-if-user-has-run-it) – TheMaster Jun 29 '19 at 06:36
  • It seems to be an authentication issue. My guess is v1 works but v2 not because may be you request a new scope. In this case you have to redo and auth flow to get a fresh new access token. – St3ph Jun 29 '19 at 07:43
  • I did confirm that redoing the access token also didn't work, and all scopes for the Apps Script API were enabled for both testing scenarios. – Jaden Ranzenberger Jul 01 '19 at 17:52

0 Answers0