LINE error 400: Failed to send messages
Last verified against LINE Developers - Messaging API reference (error responses)
Failed to send messagesWhat error 400 means
The push (or multicast) request was well-formed enough to pass JSON validation, but LINE could not deliver to the target you named in to. The error messages table says it "appears when the message fails to be sent. One reason this may appear is if the user ID specified doesn't exist." The push endpoint's own error table is more specific about what "doesn't exist" means in practice: a user ID "that doesn't exist in this channel is specified, such as a user ID obtained from channels under other providers," a non-existent group chat, or a group or multi-person chat "that your LINE Official Account doesn't participate in."
The provider scoping is the detail that catches teams migrating or running multiple channels: LINE user IDs are stable across channels under the same provider, but a U... ID harvested from a channel under a different provider is meaningless in yours and fails exactly like a random string. IDs must come from your own channel's webhook events or its user ID endpoints.
Equally important is what does not produce this error. Pushing to a user who blocked your LINE Official Account, deleted their account, or never friended you returns 200 - the request succeeds, the user just "won't receive the message." So this 400 means the identifier itself is invalid for your channel, while blocks fail silently on push and only become visible as 404 Not found when you request the user's profile. If the failure were quota or throughput you would see 429 instead.
What it looks like
// If you failed to send a message (400 Bad Request)
{
"message": "Failed to send messages"
}Why it happens
- The user ID was obtained from a channel under a different provider, so it doesn't exist in this channel.
- The groupId or roomId points to a group or multi-person chat your LINE Official Account is no longer a member of (it was removed, or left).
- The ID was corrupted in storage - truncated, lowercased, or a userId stored where a groupId belongs.
- Test data from another environment (staging channel IDs in production) is being replayed.
- An invalid message object slipped through alongside a valid recipient - the push error table lists this as another trigger for the same 400.
How to fix LINE error 400
- 1Log the exact to value that failed and check its shape: user IDs match U[0-9a-f]{32}, and group IDs start with C.
- 2Confirm the ID originated from this channel - a webhook event, the follower list endpoint, or a group your account currently belongs to.
- 3For group failures, check for leave/memberLeft events in your webhook history; a bot removed from the group can no longer push to it.
- 4Cross-check with GET /v2/bot/profile/{userId}: a 404 there tells you the ID is unusable (or the user blocked you) without spending a message.
- 5If you operate several channels, verify the channel access token in the Authorization header belongs to the same channel that produced the recipient ID.
How to stop it recurring
Store recipient IDs together with the channel that produced them and never mix providers. Prune group IDs on leave events and user IDs when profile lookups start returning 404. Remember that push delivery is silent about blocks - build your "reachable" flag from webhook activity and profile checks rather than from push responses returning 200.
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?
The push (or multicast) request was well-formed enough to pass JSON validation, but LINE could not deliver to the target you named in to . The error messages table says it "appears when the message fails to be sent.
How do I fix LINE error 400?
1. Log the exact to value that failed and check its shape: user IDs match U[0-9a-f]{32}, and group IDs start with C. 2. Confirm the ID originated from this channel - a webhook event, the follower list endpoint, or a group your account currently belongs to. 3. For group failures, check for leave/memberLeft events in your webhook history; a bot removed from the group can no longer push to it. 4. Cross-check with GET /v2/bot/profile/{userId}: a 404 there tells you the ID is…
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.