Skip to content
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

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

Closed
gitagogaming opened this issue Jul 31, 2022 · 4 comments · Fixed by #1428
Closed

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

gitagogaming opened this issue Jul 31, 2022 · 4 comments · Fixed by #1428
Milestone

Comments

@gitagogaming
Copy link

  • 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
@lavigne958
Copy link
Collaborator

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 lavigne958 self-assigned this Jul 31, 2022
@lavigne958 lavigne958 added Improvement Need investigation This issue needs to be tested or investigated labels Jul 31, 2022
@gitagogaming
Copy link
Author

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"

@lavigne958
Copy link
Collaborator

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
Copy link
Collaborator

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 lavigne958 removed the Need investigation This issue needs to be tested or investigated label May 11, 2023
@alifeee alifeee added this to the 6.0.0 milestone Jun 29, 2023
@alifeee alifeee removed this from the 6.0.0 milestone Oct 19, 2023
@lavigne958 lavigne958 added this to the 6.1.0 milestone Jan 19, 2024
@lavigne958 lavigne958 removed their assignment Jan 27, 2024
lavigne958 added a commit that referenced this issue Feb 28, 2024
Add a new auth method that allows users to open public
spreadsheet files with a simple API key.

closes #1096

Signed-off-by: Alexandre Lavigne <lavigne958@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants