Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

error acessing a google sheet with gs_url #272

Closed
gusmmm opened this issue Aug 28, 2016 · 7 comments
Closed

error acessing a google sheet with gs_url #272

gusmmm opened this issue Aug 28, 2016 · 7 comments

Comments

@gusmmm
Copy link

gusmmm commented Aug 28, 2016

I can no longer access my google sheet - with enabled link to view - with gs_url(link), from today. It was working just fine until yesterday, nothing was changed in my code or sheet. The error I get is:

Worksheets feed constructed with public visibility
Error in stop_for_content_type(req, expected = "application/atom+xml; charset=UTF-8") :
Expected content-type:
application/atom+xml; charset=UTF-8
Actual content-type:
text/html; charset=UTF-8

Any idea why? Thanks

@jennybc
Copy link
Owner

jennybc commented Aug 28, 2016

Can you make sure this sheet is Published to the web via the File menu? Merely being Public on the web, via the share button in upper right corner, is not enough to permit API access.

@jennybc
Copy link
Owner

jennybc commented Aug 28, 2016

It is totally confusing, see large red box number 2 here: https://developers.google.com/google-apps/spreadsheets/worksheets and I should make more of an effort to catch and provide a constructive error message.

@gusmmm
Copy link
Author

gusmmm commented Aug 30, 2016

It solved the problem. I don't understand why this worked well before, then all of a sudden it stopped working. It worked perfectly just by sharing the link without having to publish it to the web...

@jennybc
Copy link
Owner

jennybc commented Aug 30, 2016

Not sure if I understand you correctly ... but a Sheet that is "Public on the web" will "work perfectly" for other people if they are viewing and editing it through, e.g., the browser. But the googlesheets package needs something beyond that. We need access via the Sheets API and it has higher and very confusing standards. It requires the Sheet to be "Published on the web". Glad you've got it working.

@simeonrox
Copy link

Hi I have managed to pull a public googlesheet that I have published to the web in R studio. However, when I try to edit the worksheet in R studio by adding values to cells I am taken to a google sign in page. Is it not possible to edit a google sheets that has permission for anyone to edit without having to authenticate yourself ?

@jennybc
Copy link
Owner

jennybc commented Feb 13, 2019

Is it not possible to edit a google sheets that has permission for anyone to edit without having to authenticate yourself ?

That is definitely my understanding, yes, but I could be wrong or behind the times.

@LucasPuente
Copy link

FWIW, you can avoid having to publish your googlesheet to the web (which you may want to do if you're working w/ sensitive data) but authenticating your Google account using gs_auth() and making sure the .httr-oauth file that is created by that function is stored in your working directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants