LINE Messaging API · error code

LINE error 400: An image has already been uploaded to the richmenu

Permanent - do not retryHTTP 400Rich menu errors

Last verified against LINE Developers - Messaging API reference (error responses)

What LINE returns
An image has already been uploaded to the richmenu

What error 400 means

You tried to upload an image to a rich menu that already has one. The upload endpoint lists "An image is already set to the rich menu" as a 400 reason, and the reference is direct about why there is no workaround: "You can't replace an image set to a rich menu. To update your rich menu image, create a new rich menu object and upload another image."

Rich menus are effectively immutable once they have an image. That surprises people who think of a rich menu like a CMS record they can edit. The intended model is versioning: each change produces a new rich menu with a new richMenuId, you point users at the new one (default rich menu, per-user link, or alias), and then delete the old one.

Retry logic is a quieter source of this error. If the first upload actually succeeded but your client timed out or lost the response, an automatic retry hits this 400. In that case the menu is fine and already has its image - check with the download rich menu image endpoint before assuming anything is broken.

What it looks like

// The image is already set to the rich menu (400 Bad Request)
{
  "message": "An image has already been uploaded to the richmenu"
}

Why it happens

  • Trying to update a rich menu's artwork in place by uploading a new image to the existing ID.
  • A retry after a timeout re-uploads to a menu whose first upload already succeeded.
  • A deploy script runs the upload step twice for the same rich menu ID.

How to fix LINE error 400

  1. 1Create a new rich menu with POST /v2/bot/richmenu and upload the new image to the returned richMenuId.
  2. 2Switch users to it: set it as default, relink per-user menus, or update the rich menu alias to point at it.
  3. 3Delete the old rich menu once nothing references it.
  4. 4Make uploads idempotent: on this error, download the current image to confirm it is the one you meant to upload.

How to stop it recurring

Treat rich menus as versioned, write-once assets: create, upload, publish, retire. Rich menu aliases make this painless, because tab-switching actions reference the alias and you only update which richMenuId it points to. Keep the rich menu count in check too; the reference caps creation at 1000 rich menus per channel, so retire old versions.

Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.

Related codes

Error 400 - quick answers

What does LINE error 400 mean?

You tried to upload an image to a rich menu that already has one. The upload endpoint lists "An image is already set to the rich menu" as a 400 reason, and the reference is direct about why there is no workaround: "You can't replace an image set to a rich menu. To update your rich menu image, create a new rich menu object and upload another image." Rich menus are effectively immutable once they have an image.

How do I fix LINE error 400?

1. Create a new rich menu with POST /v2/bot/richmenu and upload the new image to the returned richMenuId. 2. Switch users to it: set it as default, relink per-user menus, or update the rich menu alias to point at it. 3. Delete the old rich menu once nothing references it. 4. Make uploads idempotent: on this error, download the current image to confirm it is the one you meant to upload.

Should I retry after error 400?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging LINE by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.