1

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:

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?

9
  • Can I ask you about your question? Although I thought that in your case, Web Apps might be suitable. But before I proposed it, I would like to confirm the following 4 points. 1. How many concurrent accesses by users do you suppose? 2. Where is the Spreadsheet? On your Google Drive or user's Google Drive? 3. In this case, users always access to the form using the browser? 4. If 3 is "yes", the users always access by logging in each Google account? Commented Sep 19, 2020 at 1:42
  • @Tanaike so, 1) not more than five, 2)spreadsheet is on the drive of the user that create the form with my webapp 3) the author of the form will access spreadsheet via google drive, the people the author send the form will never know is a google sheet. Commented Sep 19, 2020 at 2:18
  • Thank you for replying. I have to apologize for my poor English skill. From 1, 2 and 3 in your replying, I understood that you want to make about 5 users access to the user's Spreadsheet using user's browser with your custom HTML form (from your question, I cannot understand about "form".). Is my understanding correct? If my understanding is correct, the users always access by logging in each Google account? Commented Sep 19, 2020 at 3:39
  • Form = website, not related to Google Sheet. It’s a web form in a web app. No, users filling the web form are not required to be google users. Commented Sep 19, 2020 at 6:53
  • Thank you for replying. From 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. Commented Sep 19, 2020 at 8:31

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.