I am building a chrome extension that writes to google sheets and it is working as expected. Currently, I am using my clientID in the manifest.json, but I am wondering how would it work when I publish the chrome extension. I want the user to use their own clientID instead of mine.
Is there a way to update manifest.json with the user's clientID so they don't use mine? Or is there a way to add clientID elsewhere in my script? Or is there another way to write to google sheets without using clientID?
I'm using chrome.identity.getAuthToken every time the user makes the request to google sheets.
Related
this is what I would like to do: I wanted to create an app for my colleagues where, given a google sheet, you can send a form that would save some info on this google sheet.
I would like that, after the first login where the user gives permissions, it should not be required for the user to login again, they will be able to check the result directly on Google Sheet.
Some more info: Let's say we have the author of the Google Sheet and their customer, ok? The author of the Google Sheet creates some questions on Google Sheet, this web app will read this questions from the Google Sheet. when the customer fill an answer, in another tab of this google sheet, you will find all the answers. I want to use this single google sheet (for this specific user) as persistency. The Google Sheet, if possible, should not be public.
I was checking the documentation for Google API and Google Sheet but it seems this product doesn't fix my use case. I could be wrong though.
I checked the following links:
https://developers.google.com/identity/protocols/oauth2/web-server
https://developers.google.com/sheets/api/quickstart/js?authuser=2
https://developers.google.com/identity/protocols/oauth2
What I understood from this is that, best case scenario, after you log in, you receive an access token and a refresh token. The refresh token could be used for my use case when the access token expires, but the refresh token can be used for a limited amount of time (6 months) and you cannot use it for more than 50 times.
This would not work for me because when you give the form to other people so that they can use it, it could pass some time and they could be more than 50 so the refresh token will expire quite soon.
Is there any solution with Google Sheet API to just have an api key that I can you use in my backend without the risk of having an expiration (unless my user remove the permissions, in which case that would be fine)?
PS: I found this answer on SO already but only works for public sheets, I would need it to work for sheets that stay private: HTTP Google Sheets API v4 how to access without OAuth 2.0?
I'm trying to access public google sheets using google APIs.
Authentication is service accounts, I have .p12/.json file with me. How to proceed with this
Found a solution,
Create a script in google scripts and access sheet through script. And publish script as API.
Done!!
I have a Google App Script that receives users' spreadsheet urls and attempts to set data to their documents. This process works when I am signed in on my own gmail account and setting entries to my own spreadsheet, but it doesn't work with my other gmail account's spreadsheet url corresponding with the former's App Script.
I know that the documentation explicitly states:
Spreadsheet: Read only (can use most get*() methods, but not set*()).
Cannot open other spreadsheets (SpreadsheetApp.openById() or SpreadsheetApp.openByUrl()).
But is there some way that I'm unaware of that can potentially circumvent these rules? Can I have users give me read and write access so that I can set() data to their provided spreadsheet url? I've added the follow oauthscope to my appmanifest.json in my App Script:
"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets"]
So the spreadsheet url just needs to have a sharing permission of "anyone can edit."
I have an iOS app that accesses a google drive spreadsheet. To make upgrades to the app without modifying the original sheet, I made a copy of sheet to test the new code. I changed the share permissions on the copy to "anyone with link can edit". I can read the data in the copy, but I cannot change the sheet through the api.
I'm pretty sure the problem is has something to do with credentials and sharing permission.
Do I need a new credential to modify the new sheet? The "version 1" of the app is still in use and it uses the same credential, do I need a new credential for a "version 2" of my app.
What permissions should I use on the google drive sheet?
Any help will be appreciated.
Badly constructed query, I introduced a flaw when I reorganized a class.
Currently Google is migrating their old Google Data API to the new Google API.
When we do API queries over the old Google Data API, we usually use Zend Framework and the given consumer key/secret to do the authen/autho, which is fine.
Question is, is it possible to use the given consumer key/secret (from the Google Apps Marketplace listing) and the new OAuth 2 Library to call the API? What I have been having is the error message redirect_uri mismatched issue and obviously Google Apps Marketplace provides no way to change this value. Even though they had provided a link for us to go to the API Console from the listing page, I cannot see the OAuth 2.0 options in my API Access page at all.
Did I missed out anything?
If let's say I need to use the Google Apps Admin Settings API, does it mean I need to separately create a new OAuth 2.0 API Access in the API Console, then, when I need to access user data, I need to do the Auth flow again using this new consumer key/secret/redirect? I can't set this permission in the Listing Manifest? (Not supported?)
Thanks for the clarifications!
Google Apps Admin Settings is not yet migrated to the new google-api, AFAICS. Check out this list : http://code.google.com/p/google-api-java-client/wiki/APIs ;
you can however use the new google-api client libraries but you have to roll your own XML model for the given API, it is not so hard, I did a similar thing for the Contact API;
The consumer/key secret can be re-used normally if it is sufficiently scoped. A related project for your market app is automatically created in the Google Api console from what I remember..