Comments (7)
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.
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.
Thank you, Steve.
I was not aware that I could change the Authentication in the API explorer.
from go-samples.
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.
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.
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.
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)
- Golang Gmail Api HOT 4
- Logger Error and how to fix it
- Credentials problem HOT 2
- Error 500: Requested Resource Too Large to Return, responseTooLarge
- token expired and refresh token is not set HOT 1
- Unable to parse client secret file to config: oauth2/google: missing redirect URL in the client_credentials.json exit status 1 HOT 2
- Specify sheet in spreadsheets HOT 1
- Getting Unauthorized HOT 1
- sheets.New() is depricated HOT 1
- don't get token
- Unable to view or download the file uploaded using File.get(File id)
- Feature Request: Manage Group members snippets HOT 1
- "No required module provides package" errors
- Dependency Dashboard
- gmail quickstart.go will not retrieve a token HOT 9
- [SyncRepoSettings bot] - Invalid config file
- Add Calendar Snippets
- Quickstart needs OOB update HOT 1
- Googlesheets Quickstart example unreachable in localhost HOT 3
- Error Malformed auth code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-samples.