LINEテンプレート詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"template_group_id": "<string>",
"shorten_domain": "<string>",
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"url_actions": [
{
"url": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"expiration_type": "none",
"expiration_day": 182,
"expiration_hour": 11,
"expiration_min": 29,
"expiration_date": "2023-12-25",
"expiration_redirect_url": "<string>"
}
],
"message_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}LINEテンプレート
LINEテンプレート詳細取得
LINEテンプレートの詳細(メッセージ内容・URL設定)を取得します。応答の line / url_actions はテンプレート更新APIにそのまま送り返せる形式です。
ボタンの action_details と url_actions[].action_details は、テンプレートの中で直接作成したアクション(管理画面の「新規にアクションを追加」、または作成・更新APIの action_details)が設定されているときだけ動作の配列になり、アクション一覧のアクションを参照しているとき・未設定のときは null です。配列のときの action_id はその設定箇所専用で、アクション取得APIでは取得できず、他のテンプレートや他のURLには指定できません。
LINEテンプレート詳細取得
curl --request GET \
--url https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"template_group_id": "<string>",
"shorten_domain": "<string>",
"line": {
"sender_id": "<string>",
"messages": [
{}
]
},
"url_actions": [
{
"url": "<string>",
"action_id": "<string>",
"action_details": [
{
"type": "scenario",
"scenario_id": "<string>",
"scenario_action": "register",
"scenario_registration_type": "prohibit_multiple_registrations",
"use_inheriting_partner": false,
"use_inheriting_phone": false,
"account_id": "<string>",
"add_label_id": "<string>",
"delete_label_id": "<string>",
"message": "<string>",
"line_template_id": "<string>",
"rich_menu_id": "<string>",
"url": "<string>",
"data": [
{
"name": "<string>",
"value": "<string>"
}
],
"bundle_course_id": "<string>",
"product_id": "<string>",
"funnel_id": "<string>",
"spreadsheet_account_id": "<string>",
"spreadsheet_url": "<string>",
"spreadsheet_sheet_name": "<string>",
"sheet": [
{
"name": "<string>",
"value": "<string>"
}
]
}
],
"expiration_type": "none",
"expiration_day": 182,
"expiration_hour": 11,
"expiration_min": 29,
"expiration_date": "2023-12-25",
"expiration_redirect_url": "<string>"
}
],
"message_count": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "APIキーが無効です"
}
}{
"error": {
"code": "not_found",
"message": "ページが見つかりません"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "レート制限を超過しました"
}
}GET
https://api.utage-system.com/v1/accounts/{account_id}/line/templates/{template_id}