リッチメニューリスト照会
登録されているすべてのリッチメニューのリストを照会します。
API の種類
サーバー API
Request URL
https://apis.worksmobile.com/r/{API ID}/message/v1/bot/{botNo}/richmenu
HTTP Method
GET
Path Parameters
パラメーター | 必須 | 説明 |
---|---|---|
botNo | Y | トーク Bot 番号 |
Request Example
GET https://apis.worksmobile.com/r/apiid/message/v1/bot/123/richmenu
Response
API 呼び出しに成功すると HTTP 200 コードとトーク Bot に登録されているすべてのリッチメニュー情報を返します。
プロパティ | タイプ | 説明 |
---|---|---|
richmenus | array<object> | リッチメニューのリスト |
richmenus[].richMenuId | string | リッチメニュー ID |
richmenus[].size | object | リッチメニューの幅と高さ |
richmenus[].size.width | number | リッチメニューの幅 2500 ピクセルで固定 |
richmenus[].size.height | number | リッチメニューの高さ 1686 または 843 ピクセル |
richmenus[].name | string | リッチメニュー名 最大 300 文字 |
richmenus[].areas | array<object> | 各動作(action) のエリアオブジェクト (座標/サイズ) 最大 20 個 |
richmenus[].areas[].bounds | object | エリアの境界。ピクセル単位で定義 |
richmenus[].areas[].bounds.x | number | エリア左端の位置 (メニュー左端を基準にした横方向の位置) |
richmenus[].areas[].bounds.y | number | エリア上端の位置 (メニュー上端を基準にした縦方向の位置) |
richmenus[].areas[].bounds.width | number | エリアの幅 |
richmenus[].areas[].bounds.height | number | エリアの高さ |
richmenus[].areas[].action | Action Object | エリアを押した時の動作 |
Response Example
{
"richmenus": [
{
"richMenuId": "456",
"size": {
"width": 2500,
"height": 1686
},
"name": "richmenu",
"areas": [
{
"bounds": {
"x": 0,
"y": 0,
"width": 2500,
"height": 1686
},
"action": {
"type": "postback",
"label": "buy",
"data": "action=buy&itemid=123"
}
}
]
}
]
}
Error Code
呼び出しに失敗するとエラーコードとエラーメッセージを返します。
エラーコードはトーク Bot REST API エラーコードを参照してください。