LINE error 404: the user has no richmenu
Last verified against LINE Developers - Messaging API reference (error responses)
the user has no richmenuWhat error 404 means
You asked which rich menu is linked to a specific user (GET /v2/bot/user/{userId}/richmenu) and LINE couldn't return one. The documented 404 reasons are: "The user isn't linked to a rich menu," "A non-existent user is specified," and a user who never added your account as a friend.
This endpoint reports only per-user links made with the link rich menu to user endpoints. A user who sees your default rich menu still returns 404 here, because a default isn't a per-user link. People misread that as "the menu isn't showing," when the user is actually seeing the default exactly as intended.
Linking itself has a quirk worth knowing: the link endpoint returns 200 even when the link doesn't happen, for users who deleted their account, blocked your account, aren't friends, or whose IDs come from another provider's channel. So a link call that "succeeded" followed by this 404 is a strong hint the user isn't a reachable friend. If you pass a malformed ID you'll get a 400 with The value for the 'userId' parameter is invalid instead.
What it looks like
// If you specify the user to whom the rich menu isn't linked (404 Not Found)
{
"message": "the user has no richmenu",
"details": []
}Why it happens
- The user only sees the default rich menu and was never individually linked.
- The user unlinked or was unlinked by a batch operation.
- The user isn't a friend of the account, or blocked it, so an earlier link call silently did nothing.
- The user ID comes from a channel under a different provider and doesn't exist for this channel.
How to fix LINE error 404
- 1Decide whether you need a per-user link at all; if the default is what this user should see, treat 404 as normal.
- 2Link the menu with POST /v2/bot/user/{userId}/richmenu/{richMenuId} and call this endpoint again to confirm.
- 3If the link still doesn't stick, check the user's friendship status, for example via the profile endpoint.
- 4Make sure user IDs come from webhooks received by this channel.
How to stop it recurring
Keep your own record of which users should have which per-user menu, and reconcile on follow events, since LINE won't link menus to non-friends. Don't use this endpoint as a "what does the user see" check: it ignores defaults. Batch operations that unlink menus should update your record too.
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?
You asked which rich menu is linked to a specific user ( GET /v2/bot/user/{userId}/richmenu ) and LINE couldn't return one. The documented 404 reasons are: "The user isn't linked to a rich menu," "A non-existent user is specified," and a user who never added your account as a friend. This endpoint reports only per-user links made with the link rich menu to user endpoints.
How do I fix LINE error 404?
1. Decide whether you need a per-user link at all; if the default is what this user should see, treat 404 as normal. 2. Link the menu with POST /v2/bot/user/{userId}/richmenu/{richMenuId} and call this endpoint again to confirm. 3. If the link still doesn't stick, check the user's friendship status, for example via the profile endpoint. 4. Make sure user IDs come from webhooks received by this channel.
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.