GAS 開發 LineBot 自動接單系統
/*============================================ 用 「groupId」得到 Line Group Data ============================================*/ function getLineGroup(groupId){ let response,lineGroup; try { response = UrlFetchApp.fetch("https://api.line.me/v2/bot/group/"+groupId+"/summary", { "method": "GET", "headers": { "Authorization": 'Bearer ' + CHANNEL_ACCESS_TOKEN, "Content-Type": "application/json" }, }); lineGroup = JSON.parse(response); // 解析 json }catch(e){ lineGroup = { groupId: '', groupName: '', pictureUrl: '', }; console.log(e); } //console.log(lineGroup); return lineGroup; }