LINE error 410: The content is gone
Last verified against LINE Developers - Messaging API reference (error responses)
The content is goneWhat error 410 means
The status codes table defines 410 Gone as "access to the resource that is no longer available," and on the content endpoints the documented example is precise: "if the user unsends a message (410 Gone)" the body is {"message":"The content is gone"}. The message ID was real and the content existed - but the user withdrew it, and LINE honors the unsend by cutting off API access to the bytes.
The semantic difference from 404 not found is worth encoding in your handler: 404 means the ID never referred to retrievable content in this channel (or it aged out), while 410 means it did exist and was deliberately removed. When a user unsends a message, your bot also receives an unsend webhook event carrying the messageId - the reference pairs these mechanisms, and well-behaved bots are expected to delete their stored copy in response, not just note the failure.
410 is terminal by design. There is no endpoint, header, or support path that restores unsent content, and retrying is pointless. If your product depends on captured media (receipts, verification photos), the only robust design is downloading content immediately on the message webhook - after an unsend, the API-side copy is gone regardless of retry strategy.
What it looks like
// If the user unsends a message (410 Gone)
{
"message": "The content is gone"
}Why it happens
- The user unsent the message between your webhook receipt and your content download.
- A delayed or queued media fetch ran long after the message arrived, past an unsend.
- A replayed job tried to re-download content that was unsent since the first fetch.
How to fix LINE error 410
- 1Handle 410 as permanent: mark the media as withdrawn, skip retries, and continue the flow without it.
- 2Subscribe to the unsend webhook event and delete your stored copies when it arrives - it usually reaches you before a late fetch fails.
- 3Move content downloads into the immediate async path of the message webhook so the fetch races the user's ability to unsend.
- 4If the content was required (e.g. a document upload flow), reply asking the user to send it again.
How to stop it recurring
Download user media at webhook time and store it under your own retention policy, then treat LINE's copy as already deleted. Process unsend events as deletion commands against your store - that keeps you consistent with user intent and makes 410 a non-event operationally. Distinguish 404, 410, and success in metrics so a spike in unsends is visible; see media limits for the retrieval endpoints involved.
Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.
Related codes
Error 410 - quick answers
What does LINE error 410 mean?
The status codes table defines 410 Gone as "access to the resource that is no longer available," and on the content endpoints the documented example is precise: "if the user unsends a message (410 Gone)" the body is {"message":"The content is gone"} . The message ID was real and the content existed - but the user withdrew it, and LINE honors the unsend by cutting off API access to the bytes.
How do I fix LINE error 410?
1. Handle 410 as permanent: mark the media as withdrawn, skip retries, and continue the flow without it. 2. Subscribe to the unsend webhook event and delete your stored copies when it arrives - it usually reaches you before a late fetch fails. 3. Move content downloads into the immediate async path of the message webhook so the fetch races the user's ability to unsend. 4. If the content was required (e.g. a document upload flow), reply asking the user to send it again.
Should I retry after error 410?
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.