Reputation: 13
I’ve been through every step mentioned here https://developers.google.com/google-apps/spreadsheets/#changing_contents_of_a_cell using the protocol and submitting the requests, right now, with POSTMAN before doing an actual script.
On the step of editing a cell via PUT i get a 403 Forbidden with the error "If-Match or If-None-Match header or entry etag attribute required”.
Right now my request URL is:
PUT https://spreadsheets.google.com/feeds/cells/MY_SPREADSHEET_ID/od6/private/full/R1C1?v=3.0
Headers: Authorization Bearer {my access token} Content-Type application/atom+xml
Raw
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gs="http://schemas.google.com/spreadsheets/2006">
<id>https://spreadsheets.google.com/feeds/cells/MY_SPREADSHEET_ID/od6/private/full/R1C1</id>
<link rel="edit" type="application/atom+xml"
href="https://spreadsheets.google.com/feeds/cells/MY_SPREADSHIT_ID/od6/private/full/R1C1"/>
<gs:cell row="1" col="1" inputValue="hello"/>
</entry>
Any ideas please? ps.: if I remove the ?v=3.0 there will be another error demanding the version
Upvotes: 1
Views: 133
Reputation: 154
You should add the header If-Match:*
It should work out of the box that way, however, more on subject can be found on http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Upvotes: 3