Bot

Flexible Templateのカルーセルメニューのjson定義に関して

Koshi検証用

2021.08.27既読 2131

お世話になります。

下記のURLを参考に、

Flexible Templateのカルーセルメニューを作成しています。
リクエストを送ると、HTTPステータス:400で
エラーメッセージに「Bad Request Parameters: columns are required field」と返ってきます。
上記URLのサンプルjsonを見る限り「columns」の項目はないため困惑しています。
送信したjsonを下記に記載しますので間違えている箇所がわかる方
どうかご教授お願いします。
--------------------------------------------
{
    "accountId""(個人アカウント)",
    "content": {
        "type""carousel",
        "contents": [
            {
                "type""bubble",
                "body": {
                    "type""box",
                    "layout""horizontal",
                    "contents": [
                        {
                            "type""text",
                            "text""山田太郎",
                            "wrap"true
                        }
                    ]
                },
                "footer": {
                    "type""box",
                    "layout""horizontal",
                    "contents": [
                        {
                            "type""button",
                            "style""primary",
                            "action": {
                                "type""uri",
                                "label""See more",
                                "uri""http://worksmobile.com"
                            },
                            "height""sm"
                        }
                    ]
                }
            }
        ]
    }
}
--------------------------------------------

コメント1

  • 업데이트 된 답글입니다.

    Koshi検証用 投稿者

    自己解決しました。
    以下で表示できました。
    ----------------------------------------------------------{
         "accountId": "(個人アカウント)",
         "content": {
              "type": "flex",
              "altText": "★★★★★",
              "contents": {
                   "type": "carousel",
                   "contents": [
                        {
                             "type": "bubble",
                             "body": {
                                  "type": "box",
                                  "layout": "horizontal",
                                  "contents": [
                                       {
                                            "type": "text",
                                            "text": "GOOGLE翻訳",
                                            "wrap": true
                                       }
                                  ]
                             },
                             "footer": {
                                  "type": "box",
                                  "layout": "horizontal",
                                  "contents": [
                                       {
                                            "type": "button",
                                            "style": "primary",
                                            "action": {
                                                 "type": "uri",
                                                 "label": "リンク",
                                                 "uri": "https://translate.google.co.jp/?hl=ja";
                                            },
                                            "height": "sm"
                                       }
                                  ]
                             }
                        },
                        {
                             "type": "bubble",
                             "body": {
                                  "type": "box",
                                  "layout": "horizontal",
                                  "contents": [
                                       {
                                            "type": "text",
                                            "text": "GOOGLE",
                                            "wrap": true
                                       }
                                  ]
                             },
                             "footer": {
                                  "type": "box",
                                  "layout": "horizontal",
                                  "contents": [
                                       {
                                            "type": "button",
                                            "style": "primary",
                                            "action": {
                                                 "type": "uri",
                                                 "label": "リンク",
                                                 "uri": "https://www.google.com/?hl=ja";
                                            },
                                            "height": "sm"
                                       }
                                  ]
                             }
                        }
                   ]
              }
         }
    }

    2021.08.27

    0
前の投稿 モバイルアプリ上からのブラウザ選択について
次の投稿【確認】SSO設定画面で適用を押した後の挙動について
リスト

まだ、解決できませんか?
今すぐ実際に使用しているLINE WORKSユーザーに質問してみましょう。