GET/bots/{botId}/persistentmenu

Botに登録された固定メニューを取得する。

Authorization

oauth2

Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。

Scope

bot.message
bot
bot.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/bots/{botId}/persistentmenu

Path Parameters

ParameterTypeDescription
botId integer 

Bot ID


required
example : 2000001
format : int64 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
content object (content) 

設定する固定メニュー


required 

content

PropertyTypeDescription
actions array (PersistentMenuActionStruct) 

固定メニューに追加するボタンのリスト


required
maxItems : 4 

PersistentMenuActionStruct

PropertyTypeDescription
type string 

Actionの種類


required
Allowed values : message, uri, copy 
label string 

項目に表示されるラベル
リッチメニューとカルーセルの "defaultAction" 項目を除き必須。リッチメニューは、値を指定しない場合、デスクトップ環境でデフォルトメッセージが表示される。

  • 画像カルーセルの最大文字数: 12 字
  • 固定メニューの最大文字数: 1,000 字
  • 上記以外の最大文字数: 20 字
 
postback string 

"message.postback" として返される文字列


maxLength : 1000 
text string 

項目を押すと送信されるテキスト
カルーセル、画像カルーセル、リッチメニュー、クイックリプライでは必須値であり、ボタンテンプレート、リストテンプレート、固定メニューでは label に置き換えられる。


maxLength : 300 
uri string 

項目を押すと開く URI
http、https スキーマに対応する。


maxLength : 1000 
copyText string 

項目をクリックするとクリップボードにコピーされる文字列


maxLength : 1000 
i18nLabels array (i18nLabels) 

多言語のラベルリスト


minItems : 0 
i18nTexts array (i18nTexts) 

多言語のテキストリスト


minItems : 0 

i18nLabels

PropertyTypeDescription
language string 

多国語言語コード


required
Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW 
label string 

項目に表示されるラベル

  • 画像カルーセルの最大文字数: 12 字
  • 固定メニューの最大文字数: 1,000 字
  • 上記以外の最大文字数: 20 字

required 

i18nTexts

PropertyTypeDescription
language string 

多国語言語コード


required
Allowed values : ja_JP, ko_KR, en_US, zh_CN, zh_TW 
text string 

項目を押すと送信されるテキスト
カルーセル、画像カルーセル、リッチメニュー、クイックリプライでは必須値として使用され、ボタンテンプレート、リストテンプレート、固定メニューでは label に置き換えられる。


required
maxLength : 300 

Response Example

example

1{2  "content": {3    "actions": [4      {5        "type": "message",6        "label": "Example label",7        "text": "Example text",8        "postback": "Example postback",9        "i18nLabels": [10          {11            "language": "en_US",12            "label": "Example label"13          }14        ],15        "i18nTexts": [16          {17            "language": "en_US",18            "text": "Example text"19          }20        ]21      },22      {23        "type": "uri",24        "label": "Example Homepage",25        "uri": "https://example.com",26        "i18nLabels": [27          {28            "language": "en_US",29            "label": "Example label"30          }31        ]32      }33    ]34  }35}