0

I have a Google spreadsheet published to the web, and I'm trying to read and write list-based feeds. I have not authenticated.

I can read data using a GET request just fine.

curl https://spreadsheets.google.com/feeds/list/1WngGKZHauwBqRxgC5E6DFMiJ-J8BDsadfwerF4RE0M/1/public/full 

However, all my post requests to write data come back with an error

curl --data '' https://spreadsheets.google.com/feeds/list/1WngGKZHauwBqRxgC5E6DFMiJ-J8BDlN3mMaBfF4RE0M/1/public/full curl --data '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended"><gsx:id>1</gsx:id><gsx:status>1</gsx:status><gsx:user_email>1</gsx:user_email><gsx:url domain>1</gsx:url domain><gsx:highlighted_text>1</gsx:highlighted_text><gsx:complete_text comments>1</gsx:complete_text comments><gsx:created_date>1</gsx:created_date><gsx:updated_date>1</gsx:updated_date><gsx:created_by>1</gsx:created_by><gsx:updated_by>1</gsx:updated_by></entry>' https://spreadsheets.google.com/feeds/list/1WngGKZHauwBqRxgC5E6DFMiJ-J8BDlN3mMaBfF4RE0M/1/public/full 

The error I'm getting is: "Sorry, the file you have requested does not exist. Please check the address and try again."

Do POST request require authentication? I can't find anything in the docs that say so.

Any help would be appreciated. Thanks.

1 Answer 1

1

Two things:

  • I think you need to use the private feed (.../private/full), not the public one (.../public/full) like you're using now. More on the private-versus-public distinction is in the API docs.
  • You will need an Authorization header. (That process gets pretty complicated, but there's a lot of good info here. Remember to select the appropriate scopes.)

Both are mentioned in the example about adding a list row in the Sheets API docs. (I'd link directly, but I don't have enough rep to add more than two links. Just search for "Adding a list row".)

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your response. I think I want 'public' instead of 'private' since I'm hoping to avoid using authentication and the spreadsheet has been published to the web. I'll try adding an Authorization header and see if that works.
agree with myersjustinc, the only way I have seen is with OAuth2 (or an API style id/password) ... I also use private, never made much progress with the public style.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.