Design LINE Imagemap (Rich Message)
line_design_imagemapDesign a LINE imagemap rich message and receive validated JSON ready for line_send_message. Define tappable areas, links/text replies, and optional video on a 1040px canvas.
Instructions
Build a validated Imagemap message (LINE OA Manager calls it a "Rich Message") and return it as JSON to hand to line_send_message via message.message_json. DESIGN ONLY — never calls the LINE API.
Image hosting — two paths: (1) RECOMMENDED: run line_prepare_image first and pass its prepared_key here (hosting + the 5 size variants + verification all handled; base_height auto-derived). (2) Self-hosted: pass base_url of a public HTTPS host serving ${base_url}/1040, /700, /460, /300, /240 (LINE has NO upload API) plus base_height. Canvas width is always forced to 1040; all area coordinates are px on that 1040-wide canvas and must fit inside 1040 × base_height. Optional video area supported.
Returns { message, usage_hint }.
Example (prepared): "ส่งรูปนี้เป็น Rich Message ครึ่งบน-ครึ่งล่าง" → line_prepare_image first, then { prepared_key:"ab12…", alt_text:"โปรเดือนนี้", areas:[{bounds:{x:0,y:0,width:1040,height:520},action:{type:"uri",uri:"https://shop.example.com/a"}},{bounds:{x:0,y:520,width:1040,height:520},action:{type:"uri",uri:"https://shop.example.com/b"}}] }. Example (self-hosted): same but { base_url:"https://cdn.example.com/promo", base_height:1040 } instead of prepared_key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| areas | Yes | At least 1 tappable area. Bounds are px on the 1040-wide base; must stay in bounds. | |
| video | No | Optional inline video that plays over part of the image. | |
| alt_text | Yes | Fallback text shown when the image can't render (≤400 chars). | |
| base_url | No | Self-hosting path: HTTPS base URL of a pre-hosted image set. LINE requests /1040 /700 /460 /300 /240 from it. Use line_prepare_image + prepared_key instead if the user has no host. | |
| base_height | No | Image height in px WHEN the width is 1040. REQUIRED with base_url; ignored with prepared_key (auto-derived). | |
| prepared_key | No | RECOMMENDED path: key from line_prepare_image (purpose 'imagemap'). base_url and base_height are filled in automatically from the prepared image. |