Giter VIP home page Giter VIP logo

Comments (7)

sqrrrl avatar sqrrrl commented on July 19, 2024

Changing the title. I'm pretty sure the issue is that the by default the API explorer is tied to a different developer project and doesn't have permission to call your script. You should still be able to call your script using your own clients, curl, etc.. so long as the access token you include in the request is tied to the same project as the script.

The API explorer has an option to use a custom client ID & secret. You can create an additional oauth client for your project and set the origin (IIRC should be https://developers.google.com) and call it that way.

from go-samples.

sqrrrl avatar sqrrrl commented on July 19, 2024

Also, closing this issue since it's not an issue with any of the particular samples. For general help, suggest using StackOverflow.

from go-samples.

Mattnificent avatar Mattnificent commented on July 19, 2024

Thank you, Steve.
I was not aware that I could change the Authentication in the API explorer.
image

from go-samples.

Mattnificent avatar Mattnificent commented on July 19, 2024

You know what it doesn't say anywhere in the documentation?
All referenced projects must ALSO be a part of the same Google Cloud Project.
Why is all of this so poorly documented, full of ambiguous, or misleading error messages like "missing oath credential" when it IS there, but not correct for any mystery number of mystery reasons?
The whole system is filled with EXTREMELY unintuitive and misleading interfaces, like allowing me to put in an API key AND an oauth2 client ID, unintuitive as to how many deployment types a project can have, or what projects or documents properties as associated with, and so on, when it COULD BE EXPLAINED CLEARLY WITH A SIMPLE ENTITY DIAGRAM.
Was it rushed?
Are the developers stretched too thin?
Is English not the first language of the creators?
Is it just to keep the competition out?
Was it project managed by "business" majors, or women/minorities because "white men have been in power too long"?
Nothing will function AT ALL in this dynamically typed, systemically and morally loosely defined world Google is creating.
Keep it up, the future looks real bright, guys!

from go-samples.

erickoledadevrel avatar erickoledadevrel commented on July 19, 2024

I apologize for the trouble you ran into. We do list this requirement in the documentation:

Ensure that the script and the calling application share a common Cloud Platform (GCP) project. The GCP project must be a standard GCP project; default projects created for Apps Script projects are insufficient. The standard GCP project can be a new project or an existing one.

https://developers.google.com/apps-script/api/how-tos/execute

The interfaces in the library could certainly be more tailored, but at the moment we are using the generic client library infrastructure that all Google APIs use. This unfortunately makes it more possible to take wrong turns.

from go-samples.

Mattnificent avatar Mattnificent commented on July 19, 2024

The text you quoted doesn't mention libraries - and neither does the error message.
Speaking of wrong turns, it seems like the API is completely insecure - if a user can call the run function, it appears that they can also call the get and update functions.
Who designed this? Lol...

from go-samples.

erickoledadevrel avatar erickoledadevrel commented on July 19, 2024

That restrictions is true whether you use the Go library or any other. Reading and writing the script's contents require a different scope and that the user have ACLs on the script project.

We appreciate constructive criticism, but given that the discussion here no longer seems to be productive I'm going to lock this thread.

from go-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.