gspread icon indicating copy to clipboard operation
gspread copied to clipboard

open a public sheet by using an API key instead of an oauth

Open gitagogaming opened this issue 1 year ago • 4 comments

  • Is your feature request related to a problem? Please describe.
    • Accessing a sheet which is designated as public data with Oauth causes rate limit due to multiple users. Using an API key directly would allow more updates per second to get the sheet values

  • Describe the solution you'd like
    • A new function to pull a sheets values similar to open_by_key(sheet_id) but allowing an option to pass an API key instead of the oauth tokens

  • Describe alternatives you've considered
    • as far as alternatives I've considered.. would be another library but I would like to avoid that

  • Additional context
    • Add any other context or screenshots about the feature request here. Link to other

gitagogaming avatar Jul 31 '22 02:07 gitagogaming

Hi, thank you for raising this issue. This is interesting, I did not know about this developer key / API key. I will have a look at it and see if we can add it to gspread.

If this raises the API rate limits, then it would be awesome to have it.

lavigne958 avatar Jul 31 '22 11:07 lavigne958

I was wondering if this has been considered any further?

to add onto the "reasons", This would allow some people using plugins/programs associated with gspread, they would not have to worry about that said program having full access to their sheets. Instead it would only allow a user to edit sheets which are open to view for "everyone"

gitagogaming avatar Mar 23 '23 13:03 gitagogaming

Hi yes it has been, i need time to find a clean solution that integrates with the current system.

Currently gspread is built with mandatory auth system as entry point.

I have ideas I'll test them and come back with a solution

lavigne958 avatar Mar 23 '23 15:03 lavigne958

Hi I found a way to use the API_Key to authenticate against google APIs and read publicly shared spreadsheets.

I managed to read the content of a spreadsheet with it. I faced some API rate limiting, quotas. I received the error message with a quota exceeded of 60 read requests / seconds.

This could be introduced but it won't solve the quota issue.

I will still plan to introduce that new way to open sheets.

lavigne958 avatar May 11 '23 12:05 lavigne958