LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Sunday, March 31, 2019

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

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...