LINE error 404: not found (content by message ID)
Last verified against LINE Developers - Messaging API reference (error responses)
not foundWhat error 404 means
A content retrieval call - GET https://api-data.line.me/v2/bot/message/{messageId}/content or its preview/status variants - returned 404 with the lowercase body {"message":"not found"}. The documented example labels it plainly: "if you specify a non-existent message ID." The message ID either never existed in this channel, is malformed, or doesn't refer to a message carrying retrievable content.
Three structural facts prevent most occurrences. First, content endpoints live on api-data.line.me, a different domain from the main api.line.me - the reference notes this domain "is for sending and receiving large amounts of data." Requests to the wrong domain fail. Second, only user-sent media (images, video, audio, files) has retrievable content; message IDs from your own sent messages, or from text messages, aren't content you can download. Third, content has a lifetime: the overview states that "content that users send is automatically deleted after a period of time," and once it's gone you get 410 The content is gone if the user unsent it - while an ID that never existed stays a 404. Video and audio additionally need their preparation status verified before fetching; the transcoding endpoint tells you when the content is ready.
What it looks like
// If you specify a non-existent message ID (404 Not Found)
{
"message": "not found"
}Why it happens
- The message ID is from a different channel or environment, so it doesn't exist here.
- The ID was truncated or confused with another identifier (webhookEventId, replyToken) in your pipeline.
- You requested content for a message type that has none, such as a text or sticker message.
- The content aged out - user-sent content is automatically deleted after a period of time.
- The request went to api.line.me instead of api-data.line.me.
How to fix LINE error 404
- 1Log the exact messageId and confirm it came from a webhook message event of type image, video, audio, or file in this channel.
- 2Check the request URL host: content endpoints must target api-data.line.me.
- 3For video/audio, first call the transcoding status endpoint and fetch only when the preparation status says the content is ready.
- 4Download content promptly after the webhook arrives, then store it yourself - don't treat LINE as long-term media storage.
- 5Distinguish 404 (never existed / aged out) from 410 (user unsent) in your handling and stop retrying both.
How to stop it recurring
Fetch user media in the webhook handler's async pipeline immediately and persist it to your own storage, treating LINE's copy as a short-lived cache. Key stored media by channel plus messageId so cross-environment replays can't produce dangling IDs. Wire the preparation-status check into video and audio fetches by default; see media limits for formats and size caps.
Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.
Related codes
Error 404 - quick answers
What does LINE error 404 mean?
A content retrieval call - GET https://api-data.line.me/v2/bot/message/{messageId}/content or its preview/status variants - returned 404 with the lowercase body {"message":"not found"} . The documented example labels it plainly: "if you specify a non-existent message ID." The message ID either never existed in this channel, is malformed, or doesn't refer to a message carrying retrievable content.
How do I fix LINE error 404?
1. Log the exact messageId and confirm it came from a webhook message event of type image, video, audio, or file in this channel. 2. Check the request URL host: content endpoints must target api-data.line.me. 3. For video/audio, first call the transcoding status endpoint and fetch only when the preparation status says the content is ready. 4. Download content promptly after the webhook arrives, then store it yourself - don't treat LINE as long-term media storage. 5.…
Should I retry after error 404?
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.