LINE Messaging API · error code

LINE error 404: Not found (profile: user blocked or not a friend)

Permanent - do not retryHTTP 404404 / 410: recipients, profiles and content

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

What LINE returns
Not found

What error 404 means

A profile request (GET /v2/bot/profile/{userId}) or similar user-scoped call returned 404 with the body {"message":"Not found"}. The status codes table enumerates exactly four documented reasons: "Target user ID doesn't exist. The user hasn't consented to their profile information being obtained. The user hasn't added the target LINE Official Account as a friend. The user blocked the target LINE Official Account after adding it as a friend."

The last reason is the one worth memorizing: a user who blocks your LINE Official Account makes their profile return 404. LINE has no explicit "user blocked you" error anywhere in the Messaging API - the block is only observable indirectly. Push messages to a blocked user still return 200 (the docs state the user simply "won't receive the message", and unreceived messages aren't counted against quota), the user's block fires an unfollow webhook event at the moment it happens, and from then on profile lookups 404. So a user ID that used to resolve and now returns Not found, with an unfollow event in your history, is a blocked or unfriended user - not a bug.

The consent reason matters for group contexts: in group and multi-person chats you can fetch member profiles only for users who have consented to profile access (by friending the account or agreeing to the consent screen), so 404s on group member profiles are routine and expected, not exceptional. And the "doesn't exist" reason covers cross-channel contamination - a user ID minted by a channel under a different provider doesn't exist in yours, the same scoping rule behind Failed to send messages.

Treat this 404 as permanent for the current relationship state: it flips back only if the user unblocks or re-friends the account, which you'll see as a fresh follow event.

What it looks like

// If you couldn't get profile information (404 Not Found)
{
  "message": "Not found"
}

Why it happens

  • The user blocked your LINE Official Account after adding it as a friend - profile access is cut off from that moment.
  • The user never added your account as a friend, and hasn't consented to profile access in a group context.
  • The user ID doesn't exist in this channel - typically an ID from a channel under a different provider, or corrupted storage.
  • The user deleted their LINE account entirely.
  • You're calling the one-to-one profile endpoint for a group member instead of the group member profile endpoint (or vice versa).

How to fix LINE error 404

  1. 1Check your webhook history for an unfollow event from this user ID - it timestamps the block/unfriend that explains the 404.
  2. 2Verify the ID's provenance: it must come from this channel's webhooks or follower list, and match U[0-9a-f]{32}.
  3. 3In group chats, use GET /v2/bot/group/{groupId}/member/{userId} for member profiles, and expect 404 for non-consenting members.
  4. 4Mark the user unreachable in your database and stop sending push messages - they return 200 but deliver nothing and can mask the problem.
  5. 5Resume normal handling only when a new follow event arrives, which means the user unblocked or re-added the account.

How to stop it recurring

Maintain a reachability flag per user driven by follow and unfollow webhook events - it predicts these 404s before you make the call and keeps your push lists clean, which also protects your monthly quota accounting from phantom sends. Never treat a profile 404 as retryable; queue it for state cleanup instead. In group features, design for partial profile coverage from the start, since consent is per user.

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 profile request ( GET /v2/bot/profile/{userId} ) or similar user-scoped call returned 404 with the body {"message":"Not found"} . The status codes table enumerates exactly four documented reasons: "Target user ID doesn't exist. The user hasn't consented to their profile information being obtained. The user hasn't added the target LINE Official Account as a friend.

How do I fix LINE error 404?

1. Check your webhook history for an unfollow event from this user ID - it timestamps the block/unfriend that explains the 404. 2. Verify the ID's provenance: it must come from this channel's webhooks or follower list, and match U[0-9a-f]{32}. 3. In group chats, use GET /v2/bot/group/{groupId}/member/{userId} for member profiles, and expect 404 for non-consenting members. 4. Mark the user unreachable in your database and stop sending push messages - they return 200 but…

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.