Apps Scriptリファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary

2019年3月31日日曜日

LiveChat APIでタグの一覧を取得したい


LiveChat APIでList all tagsを試したときの備忘録



コード.gs
function getTags() {
  var options = {
    "method" : "get",
    "headers" : {
      "X-API-Version": 2,
      "Content-Type" : "application/json",
      "Authorization" : "Bearer " + getProp('token')
    }
  };
  var url = "https://api.livechatinc.com/tags";
  var response = UrlFetchApp.fetch(url, options);
  Logger.log(response)
}

function getProp(key) {
  return PropertiesService.getScriptProperties().getProperty(key);
}


getProp('token')はアクセストークンです
LiveChatのアクセストークンを取得したい


参考

List all tags
https://developers.livechatinc.com/docs/rest-api/#list-all-tags


Latest post

スプレッドシートの空白セルを直前の値で埋めたい

A列の空白セルに直前の値を入れたくて書いたコードです スプレッドシートに以下のようなBeforeの表があるとき (A列に空白セルがある) Before 1 A B 2 エリア 都市 3 東京 新宿 4 渋谷 5 池袋 6 神奈川 横浜 7 川崎 8 相模原 9 千葉 千葉 10 ...