Upload / replace a LINE rich menu image
line_upload_rich_menu_imageReplace a rich menu image while preserving its layout, tap areas, and links. Downloads a public image URL, validates format and size, then uploads the new image.
Instructions
Replace the image on an EXISTING rich menu without recreating it — the richMenuId, tappable areas, and any per-user links are preserved. Downloads the image from a public HTTPS URL, validates format + size, then uploads to the api-data.line.me content endpoint (the domain switch that trips up most implementations).
Args:
rich_menu_id: ID of the existing rich menu to update.
image_url: Public HTTPS URL of the new image. JPEG/PNG, ≤1MB.
oa: Optional OA id.
Returns: { rich_menu_id: string, uploaded: true, bytes: number // size of the uploaded image }
Image requirements (validated client-side before upload):
Format: JPEG or PNG
File size: ≤1MB
Examples:
"เปลี่ยนรูป rich menu R123 เป็นแบนเนอร์ใหม่" → { rich_menu_id: "R123", image_url: "https://.../banner.png" }
Errors:
image_url not reachable → returns download error
unsupported format → returns format error
IMAGE_TOO_LARGE → ≥1MB; compress and retry
404 → rich_menu_id not found
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rich_menu_id | Yes | ID of the existing rich menu whose image will be replaced. | |
| image_url | Yes | Public HTTPS URL of the new image. Must be JPEG or PNG, ≤1MB. | |
| oa | No | Optional OA id; defaults to active OA. |