I cannot get the PUT method to work. What is wrong with my Google Script code ?
I cannot get the PUT method to work. It does not error but it also does not update the sheet. The same code framework will add columns (with a POST), and pull back data (with a GET)..but it will not put data into the sheet.
Tried it with Content-Type in the Headers section and Options, with out single quotes and with,..all kinf\ds of variations but no good.
var headers3 = { "Authorization" : "Bearer " + basicToken, };
var url3 = 'https://api.smartsheet.com/2.0/sheets/' + googleSheetData1[x][0]+ '/rows' ;
var options3 = {
'method': "PUT",
'content-type':'application/json',
'headers': headers3,
'muteHttpExceptions' : true,
'payload': JSON.stringify([{"id":rowidx,"cells":[{"columnid":colidx,"value":"kevintest"}]}])
}
try{ var response3 = UrlFetchApp.fetch(encodeURI(url3),options3);
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 351 Global Discussions
- 198 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 36 Webinars
- 7.3K Forum Archives