I had the same issue - it's crazy simple but took me hours to catch. When you append values, it changes from a PUT request to a POST request. Change your request to POST and it works!
(Why those are different is beyond me) On Saturday, April 29, 2017 at 9:27:55 PM UTC-6, Ranjith SC wrote: > > Hi, > POST/PUT request to append row using spreadsheet api returns 404 error. > This API doc was used as reference - > https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append > > Below is the request and response. If the ':append' is removed from the > url path, then the request works fine. But the new data overrides the > existing row. Any idea what's wrong with this request to append rows. > > > 1. Request URL: > > > https://sheets.googleapis.com/v4/spreadsheets/1gpa0ByqgiDbGawyStfsJit8SdJfgi0rQsAAlzWkU7uM/values/ > *A2:append*?valueInputOption=RAW&alt=json > 2. Request Method: > PUT > 3. Status Code: > 404 > 4. Remote Address: > 172.217.6.42:443 > 5. Referrer Policy: > no-referrer-when-downgrade > 1. Response Headers > 1. alt-svc: > quic=":443"; ma=2592000; v="37,36,35" > 2. content-length: > 1672 > 3. content-type: > text/html; charset=UTF-8 > 4. date: > Sun, 30 Apr 2017 02:53:20 GMT > 5. server: > ESF > 6. status: > 404 > 7. x-frame-options: > SAMEORIGIN > 8. x-xss-protection: > 1; mode=block > 2. Request Headers > 1. Provisional headers are shown > 2. Authorization: > Bearer xxxxxxxxxxx > 3. Content-Type: > application/json > 4. Origin: > chrome-extension://xxxxxxxx > 5. User-Agent: > Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 > (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 > 3. Query String Parametersview sourceview URL encoded > 1. valueInputOption: > RAW > 2. alt: > json > 4. Request Payloadview source > 1. > 1. {values: []} > 1. values:[] > > > -- You received this message because you are subscribed to the Google Groups "Google Spreadsheets API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
