LINE Messaging API reference

LINE Messaging API errors, explained one by one

23documented codes
7categories
2026-08-20last verified

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

LINE does not use numeric error codes the way Meta or Telegram do. A failed Messaging API call gives you exactly two things: an HTTP status code and a JSON body whose message property carries a documented English string such as Invalid reply token or You have reached your monthly limit. When the problem is inside your request body, the response adds a details array, and each element pins the fault to a location: details[].property names the JSON field or query parameter (for example messages[0].text), and details[].message says what is wrong with it (May not be empty). The reference states the array is omitted entirely when it would be empty, so never assume it exists. Every response also carries an X-Line-Request-Id header, which is the identifier to quote if you contact LINE support.

To read LINE errors correctly you also need the platform's core sending model. Replying to a webhook event with its single-use replyToken is free and does not touch your monthly quota; pushing a message on your own initiative (push, multicast, narrowcast, broadcast) consumes the quota attached to your LINE Official Account's subscription plan. That split explains the errors that surprise people most: Invalid reply token appears when the one-minute, one-use token contract is broken, and You have reached your monthly limit. appears when paid-side sending runs out, even though replies keep working. The pages below cover every error message and status LINE documents for the Messaging API, with the literal strings, example bodies, and concrete fixes. Statuses and message strings are quoted from the official reference; where LINE templates in variable text, the varying part is marked.

How to read a LINE error

HTTP/1.1 400 Bad Request
x-line-request-id: 5b59509c-c57b-11e9-aa8c-2a2ae2dbcce4

{
  "message": "The request body has 2 error(s)",
  "details": [
    {
      "message": "May not be empty",
      "property": "messages[0].text"
    },
    {
      "message": "Must be one of the following values: [text, image, video, audio, location, sticker, template, imagemap]",
      "property": "messages[1].type"
    }
  ]
}

All 23 codes

Jump to: 400 / 409 / 413: request body, tokens and payload (9) · 401 and channel access token errors (3) · 403 / monthly quota: plan and permission limits (2) · 404 / 410: recipients, profiles and content (5) · 429: rate limits and concurrency (2) · Webhook configuration errors (1) · 500: LINE-side failures (1)

400 / 409 / 413: request body, tokens and payload

CodeTitleHTTPType
400Invalid reply token
Invalid reply token
400Permanent - do not retry
400The request body has X error(s)
The request body has X error(s) <detail varies>
400Permanent - do not retry
400The property, XXX, in the request body is invalid
The property, XXX, in the request body is invalid (line: XXX, column: XXX) <detail varies>
400Permanent - do not retry
400The request body could not be parsed as JSON
The request body could not be parsed as JSON (line: XXX, column: XXX) <detail varies>
400Permanent - do not retry
400The content type, XXX, is not supported
The content type, XXX, is not supported <detail varies>
400Configuration
409The retry key is already accepted
The retry key is already accepted
409Permanent - do not retry
413Payload Too Large (request over 2MB)
Request exceeds the max size of 2MB. Make the request smaller than 2MB and try again.
413Permanent - do not retry
415Unsupported Media Type
<detail varies>
415Permanent - do not retry
400Invalid audience group id
Invalid audience group id: {audience ID} <detail varies>
400Permanent - do not retry

401 and channel access token errors

CodeTitleHTTPType
400The access token expired
invalid_request / The access token expired
400Configuration
400invalid_client (invalid client_id / client_secret)
invalid_client / invalid client_id <detail varies>
400Configuration
401Authentication failed
Authentication failed due to the following reason: XXX <detail varies>
401Configuration

403 / monthly quota: plan and permission limits

CodeTitleHTTPType
403Access to this API is not available for your account
Access to this API is not available for your account
403Policy / account
429You have reached your monthly limit.
You have reached your monthly limit.
429Policy / account

404 / 410: recipients, profiles and content

CodeTitleHTTPType
400Failed to send messages
Failed to send messages
400Permanent - do not retry
403Not enough recipients (narrowcast)
Not enough recipients <detail varies>
403Policy / account
404Not found (profile: user blocked or not a friend)
Not found
404Permanent - do not retry
404not found (content by message ID)
not found
404Permanent - do not retry
410The content is gone
The content is gone
410Permanent - do not retry

429: rate limits and concurrency

CodeTitleHTTPType
429Too Many Requests (rate limit)
The API rate limit has been exceeded. Try again later.
429Retryable
429Too Many Requests (concurrent audience operations)
<detail varies>
429Retryable

Webhook configuration errors

CodeTitleHTTPType
400Invalid webhook endpoint URL
Invalid webhook endpoint URL
400Configuration

500: LINE-side failures

CodeTitleHTTPType
500Internal Server Error
<detail varies>
500Retryable

LINE guides and tools

Other platforms

Frequently asked questions

Does the LINE Messaging API use numeric error codes?

No. LINE returns a plain HTTP status code (400, 401, 403, 404, 409, 410, 413, 415, 429, 500) plus a JSON body with a documented message string such as "Invalid reply token" or "Failed to send messages". Validation problems additionally include a details array where details[].property names the offending JSON field and details[].message describes the fault. There is no separate platform-specific code number to look up.

Why do I get "Invalid reply token" from the reply endpoint?

The reference gives two reasons: the reply token was already used, or it expired. Reply tokens can only be used once and must be used within one minute of receiving the webhook; use beyond one minute isn't guaranteed to work. Sending two reply calls for one event, replaying stored tokens, or replying after slow processing all trigger it. Switch to a push message when you miss the window.

Are reply messages free on the LINE Messaging API?

Yes. The pricing documentation lists reply messages under "sending methods that are not counted as message count", while push, multicast, narrowcast, and broadcast messages are counted against the monthly quota of your LINE Official Account's subscription plan. Messages are counted per recipient, and sends to users who blocked you or to non-existent user IDs are not counted.

What does HTTP 429 mean on the LINE Messaging API?

Four documented causes: you exceeded the per-endpoint rate limit, you exceeded the limit on concurrent audience operations, you used up your plan's free messages, or you hit your configured cap of additional paid messages. The body distinguishes them: "The API rate limit has been exceeded. Try again later." is throughput, while "You have reached your monthly limit." is quota. The fixes are opposite - back off versus upgrade your plan.

What is the rate limit for sending push messages on LINE?

The reference sets 2,000 requests per second per channel for the push and reply endpoints (the general "other API endpoints" tier). Multicast is 200 requests per second, broadcast and narrowcast are 60 requests per hour, and issuing short-lived channel access tokens is 370 requests per second. Limits are enforced per channel with a token bucket algorithm, not a fixed reset window.

Why does getting a LINE user profile return 404 Not Found?

The status codes table lists four reasons: the user ID doesn't exist, the user hasn't consented to profile access, the user never added your LINE Official Account as a friend, or the user blocked it after adding it. A block therefore surfaces as 404 with body {"message":"Not found"} - there is no explicit "blocked" error, so treat profile 404s on previously working IDs as a likely block.

How does X-Line-Retry-Key idempotency work on LINE?

You generate a UUID yourself and send it in the X-Line-Retry-Key header of a push, multicast, narrowcast, or broadcast request. If LINE already accepted a request with that key, the retry returns 409 Conflict with "The retry key is already accepted" and an x-line-accepted-request-id header instead of sending duplicates. LINE manages keys for 24 hours; after that, the same key is treated as a brand-new request.

How long is a LINE reply token valid?

The documented rule is one minute from receiving the webhook, and "use beyond one minute isn't guaranteed to work." Tokens in redelivered webhooks can also be used within one minute of the redelivery, unless the original token was already used or 20 minutes have passed since the event occurred. LINE explicitly warns the time limit is subject to change, so reply as soon as possible.

What does "Access to this API is not available for your account" mean?

The error messages table says it "appears when calling an API that you do not have permission to use." Several capabilities are gated: narrowcast attribute targeting requires a target reach of at least 100 friends, and Identifiers for Advertisers (IFA) audiences require a completed corporate application. It is an account or plan entitlement problem, not a bug - the same request works on an account that has the capability.

Does LINE retry webhooks my server failed to receive?

Only if you enable webhook redelivery in the LINE Developers Console (it is off by default). LINE then re-sends webhooks your server didn't answer with a 2xx status, for an undisclosed number of attempts at undisclosed intervals. Redelivered events keep the same webhookEventId and reply token but set deliveryContext.isRedelivery to true, so deduplicate by event ID and expect out-of-order arrival.

Run your LINE bot without babysitting error codes

Conferbot manages the connection, tokens, webhooks and retries, and shows failures as readable status.