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?
users filling the web form are not required to be google users.of your replying, I could understand that in your situation, the Web Apps created by Google Apps Script is not suitable. Because in this case, when you want to make users create and update the user's Spreadsheet, it is required to use the Google account. So I deeply apologize my proposal was not useful for your situation.