I did a mix of all of your suggestions, plus I needed to use the non 'obsolete' ID of the Project. When I publish the script, it gives me an ID, which I was using succesfully as long as owner runs the routine, and only within Google Chrome (If I try it on Edge it fails). When I publish and try it with a different user it stop working. I open the script, go to file / Project properties and copy the longer Script ID instead. The routine start working for any user then. In the following image I underscore in red the key that Works for developer alone, and in Green the key that Works for all users (they're cutted in purpouse, and my environment is in spanish so actual translated options may vary, sorry)
I believe it is worth to make a summary:
- I follow intructions at 'Using the execution API' and quickstarts to publish my script as execution API. (Create the script, enable Google Apps Script Execution API, publish as API executable with Access by everybody)
- I made the script visible fro everybody, on File / Sharing:
- I made sure that devMode was not set true on my call. Here the JavaScript call snipet:
- I made sure that all of the scopes in the Project were included during the OAuth request:
- I have to wait a few minutes to get all security rights to get ready (i.e. OAuth credentials)
Basically, these are all the required steps I needed to follow in order to get the script up and running. Hope it helps. Finally I would like you to see what I saw when it failed and when it succeeded:
Thank you!