-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where is the source code please? #669
Comments
|
That said, you and @jbasinger are welcome to join me in the research of GAPI source code, you can find my code and findings here: https://github.com/Maxim-Mazurok/gapi |
@Maxim-Mazurok Thanks. I turned to use https://github.com/googleapis/google-api-nodejs-client instead |
Cool, so you needed library for the backend, not for the front-end. |
I need it for frontend. And I created a proxy on server side. And it is not just frontend vs backend. google-api-nodejs-client is way more powerful than this project. I mean this project is not a browser side clone of the node.js lib. There are lots of things that it cannot do while the node.js one can do. So even my app is a pure frontend one, I cannot use this lib. |
Interesting... Which API are you using? As far as I know, NodeJS version of the lib is generated using the same Google API Discovery schema. So, there should not be any difference... |
I am using the service account with domain-wide authority. |
Ohh.. so, it's not like other APIs (such as Sheets or Drive), looks like you're interested in gapi.auth2, which is not covered by Google API Discovery. |
I am not an expert either. I just struggled to get what I want done. I do need to invoke APIs like Sheets, Drive, Calendar...etc. But I need to invoke the API as the admin on behalf of other users. Let's say there are 1000 users in the company, I only need to authorize as the admin to update everybody's calendar. |
In this case, you definitely have to use NodeJS GAPI, not a client-side JS. It says
on the page you shared. As far as I understand, this is a very sensitive action, so Google doesn't allow this on the client. Also, all of their examples involve back-end languages, such as Java. I may be wrong on this one, but I think that you can't use a service account on the front-end. |
@Maxim-Mazurok what you said are all correct. My app's GUI is on frontend so I need to initiate the call from frontend. I created a proxy on server: https://github.com/tylerlong/express-proxy/blob/master/src/index.ts#L69-L79 so that I can invoke it from frontend. May not be the best practice but it works for me. |
Got it... As long as you keep your website private - it should be fine :) Thanks for sharing! |
The source code for GAPI is currently not published and is periodically updated by Google. It is not suggested or supported to use downloaded versions of the code. I am closing this for now, but if you still need help with this question, please reopen. |
This one is kind of too short: https://github.com/google/google-api-javascript-client/blob/master/javascripts/main.js
The text was updated successfully, but these errors were encountered: