LINE error 500: Internal Server Error
Last verified against LINE Developers - Messaging API reference (error responses)
<detail varies>What error 500 means
The status codes table keeps this one to five words: "Error on the internal server." Something failed on LINE's side while processing an otherwise deliverable request. There is nothing in your payload to fix, no documented sub-codes to branch on, and no promised body shape beyond the standard error JSON - treat any 5xx from api.line.me or api-data.line.me the same way.
The operational question a 500 leaves open is the dangerous part: did the message send before the failure, or not? For reply messages the answer is bounded - the reply token is single-use, so a retry either works or returns Invalid reply token, which itself tells you the original was accepted. For push, multicast, narrowcast, and broadcast, LINE built the answer into the API: send an X-Line-Retry-Key UUID with the original request, retry with the same key on any ambiguous failure, and the platform guarantees you either re-process a genuinely failed request or get a 409 with the accepted request ID instead of a duplicate delivery. This is exactly the scenario the retrying-API-request docs were written for.
Sustained 500s across endpoints usually indicate a platform incident; check the LINE Developers site's news and status information before burning retry budget. Keep the X-Line-Request-Id header from failed responses - it's the identifier LINE support needs.
What it looks like
HTTP/1.1 500 Internal Server Error
{
"message": "Internal server error"
}Why it happens
- A transient fault in the LINE Platform while processing the request.
- A platform incident or maintenance window affecting Messaging API endpoints.
- Rarely, an edge-case payload that LINE's side fails on rather than rejecting with a 4xx - report these with the request ID.
How to fix LINE error 500
- 1Retry with exponential backoff and jitter, capping attempts - a few retries over tens of seconds, not tight loops.
- 2For push/multicast/narrowcast/broadcast, retry with the same X-Line-Retry-Key you sent originally so duplicates are impossible.
- 3For replies, retry once promptly; if you then get Invalid reply token, the original send succeeded before the 500 reached you.
- 4Record x-line-request-id for every failure and check LINE Developers news for incident notices before escalating.
- 5If 500s persist for one specific payload while others succeed, minimize the payload to isolate the trigger and contact LINE support with the request IDs.
How to stop it recurring
You can't prevent LINE-side failures; you can make them harmless. Send every quota-bearing message with a persisted retry key, run retries through a bounded backoff policy, and alert on 5xx rate rather than individual occurrences. Design webhook processing to tolerate the corresponding LINE-side behavior too - with redelivery enabled, your own outages become recoverable the same way; see the webhook debugging guide.
Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.
Related codes
Error 500 - quick answers
What does LINE error 500 mean?
The status codes table keeps this one to five words: "Error on the internal server." Something failed on LINE's side while processing an otherwise deliverable request. There is nothing in your payload to fix, no documented sub-codes to branch on, and no promised body shape beyond the standard error JSON - treat any 5xx from api.line.me or api-data.line.me the same way.
How do I fix LINE error 500?
1. Retry with exponential backoff and jitter, capping attempts - a few retries over tens of seconds, not tight loops. 2. For push/multicast/narrowcast/broadcast, retry with the same X-Line-Retry-Key you sent originally so duplicates are impossible. 3. For replies, retry once promptly; if you then get Invalid reply token, the original send succeeded before the 500 reached you. 4. Record x-line-request-id for every failure and check LINE Developers news for incident notices…
Can I retry after error 500?
Yes - this is a retryable condition. Back off (start around one second and double on each attempt, with jitter) and watch for a retry-after hint from the platform before resending.
Stop debugging LINE by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.