API で Tag の追加を試したときの備忘録
コード.gs
function postTag() { var payload = { "tag": "追加タグ名", "author": "NAME@gmail.com", "group": 0, } var options = { "method": "post", "headers": { "X-API-Version": 2, "Content-Type": "application/json", "Authorization": "Bearer " + getProp("token") }, "payload": JSON.stringify(payload) }; var url = "https://api.livechatinc.com/tags"; var response = UrlFetchApp.fetch(url, options); Logger.log(response) } |