LINE Messaging API · error code

LINE error 400: The content can not be previewed

Permanent - do not retryHTTP 400404 / 410: recipients, profiles and content

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

What LINE returns
The content can not be previewed

What error 400 means

You called the preview endpoint, GET https://api-data.line.me/v2/bot/message/{messageId}/content/preview, with the ID of a message that has no preview. Previews exist only for images and videos: the path parameter is documented as "Message ID of image or video," and the example error is labeled "If you specify a message ID other than image or video (400 Bad Request)."

The message ID is real - otherwise you would get 404 not found - it is just the wrong kind of message. Audio and file messages carry downloadable content but no preview image; text, sticker, and location messages have neither. A generic media handler that requests a thumbnail for every message with an ID will hit this on the first audio clip or PDF a user sends.

Also keep the preview's lifetime in mind. The reference says the preview image "is automatically deleted after a certain period from when the message was sent. There is no guarantee for how long preview image is stored." An expired or unsent message yields a 404 or 410 instead, so fetch previews promptly if you need them.

What it looks like

// If you specify a message ID other than image or video (400 Bad Request)
{
  "message": "The content can not be previewed"
}

Why it happens

  • The message is audio or file, which have content but no preview.
  • The message is text, sticker, or location and has no content at all.
  • A generic thumbnail routine runs for every message ID without checking message.type.

How to fix LINE error 400

  1. 1Check message.type in the webhook event and call the preview endpoint only for image and video.
  2. 2For audio and file messages, fetch the full content from /v2/bot/message/{messageId}/content instead.
  3. 3For video, check the preparation status endpoint before fetching, since content may still be processing.
  4. 4Send requests to api-data.line.me, not api.line.me.

How to stop it recurring

Build a type-to-action table for user media (image and video: preview and content; audio and file: content only; others: none) and drive all content calls from it. Download what you need right after the webhook arrives and store it yourself, since LINE deletes previews and content on its own schedule. Media size and format limits are summarized in media limits.

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 called the preview endpoint, GET https://api-data.line.me/v2/bot/message/{messageId}/content/preview , with the ID of a message that has no preview.

How do I fix LINE error 400?

1. Check message.type in the webhook event and call the preview endpoint only for image and video. 2. For audio and file messages, fetch the full content from /v2/bot/message/{messageId}/content instead. 3. For video, check the preparation status endpoint before fetching, since content may still be processing. 4. Send requests to api-data.line.me, not api.line.me.

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.