You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A resource key helps protect your file from unintended access. Resource keys are an additional parameter that are passed so users can access certain files that have been shared using a link. Users who haven't viewed the file before must provide the resource key to gain access. Those who have recently viewed the file, or have direct access, don't need the resource key to access the file.
To Reproduce
Steps to reproduce the behavior:
Call client.open_by_url(sheet_url) with an URL containing the ?resourcekey=0-xyz-123 key.
Sheet authorization failed: <HttpError 404 when requesting https://sheets.googleapis.com/v4/spreadsheets/0-xyz-123?includeGridData=false&fields=%2A&alt=json returned "Requested entity was not found.". Details: "Requested entity was not found.">
Remove the ?resourcekey=0-xyz-123 from the URL before passing it to client.open_by_url(sheet_url) causes the call to be made successfully (as long as proper access is set, of course).
System Information
OS: OSX local, deployed to unix env
pygsheets version : 2.0.6
pygsheets installed from (github or pypi): pypi
The text was updated successfully, but these errors were encountered:
I guess the most straightforward fix for this is passing sheet URL stripped of any params to .open_by_url since it doesn't need any of the params to work.
Describe the bug
Sometimes google sheet URL's have
?resourcekey=0-xyz-123
in them. Some do not. The ones that do fail with a 404 Url not found error.The resource key is overviewed here:
https://developers.google.com/drive/api/guides/resource-keys
To Reproduce
Steps to reproduce the behavior:
Call
client.open_by_url(sheet_url)
with an URL containing the?resourcekey=0-xyz-123
key.Remove the
?resourcekey=0-xyz-123
from the URL before passing it toclient.open_by_url(sheet_url)
causes the call to be made successfully (as long as proper access is set, of course).System Information
The text was updated successfully, but these errors were encountered: