LINE Messaging API · error code

LINE error 404: Webhook endpoint not found

ConfigurationHTTP 404Webhook configuration errors

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

What LINE returns
Webhook endpoint not found

What error 404 means

You asked LINE about the channel's webhook - either GET /v2/bot/channel/webhook/endpoint (get webhook endpoint information) or POST /v2/bot/channel/webhook/test (test webhook endpoint) - and the channel has no webhook URL configured. Both endpoints document the same 404 row: "The webhook URL isn't set to the channel." The body is the short string {"message":"Webhook endpoint not found"}.

This is not a connectivity failure. LINE never tried to reach your server; it simply has no URL on file for the channel whose access token you used. That distinguishes it from Invalid webhook endpoint URL, where a URL exists but can't be resolved or is malformed, and from the delivery failures (could_not_connect, request_timeout) that only appear once a URL is set and LINE actually attempts delivery.

Usually it is a token mix-up - a pipeline testing with another channel's access token (staging versus production) - or a fresh channel where nobody has entered the URL yet.

What it looks like

// If the webhook URL isn't set (404 Not Found)
{
  "message": "Webhook endpoint not found"
}

Why it happens

  • The channel's Webhook URL field in the LINE Developers Console was never filled in.
  • The channel access token belongs to a different channel than the one you configured (staging token used against production, or vice versa).
  • A provisioning script calls the test endpoint before the set-webhook-endpoint call has run.
  • The webhook URL was cleared from the console during a migration and not re-entered.

How to fix LINE error 404

  1. 1Decode which channel your token belongs to (the channel ID shown next to the token in the console) and confirm it is the channel you meant to test.
  2. 2Set the URL with PUT /v2/bot/channel/webhook/endpoint and a JSON body {"endpoint": "https://your.host/callback"}, or paste it into the Messaging API tab of the console.
  3. 3Turn on Use webhook in the console; a URL with webhooks disabled is reported by the get endpoint as active: false rather than as an error.
  4. 4Call GET /v2/bot/channel/webhook/endpoint again and confirm it returns your endpoint value, then run the test endpoint.

How to stop it recurring

Make webhook configuration part of channel provisioning: set the endpoint with the API, then immediately read it back and fail the deploy if the response is a 404 or shows "active": false. Keep a per-environment map of channel ID to token so a staging credential can't silently target the wrong channel. The webhook debugging guide covers the checks that come next.

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 LINE about the channel's webhook - either GET /v2/bot/channel/webhook/endpoint (get webhook endpoint information) or POST /v2/bot/channel/webhook/test (test webhook endpoint) - and the channel has no webhook URL configured. Both endpoints document the same 404 row: "The webhook URL isn't set to the channel." The body is the short string {"message":"Webhook endpoint not found"} .

How do I fix LINE error 404?

1. Decode which channel your token belongs to (the channel ID shown next to the token in the console) and confirm it is the channel you meant to test. 2. Set the URL with PUT /v2/bot/channel/webhook/endpoint and a JSON body {"endpoint": "https://your.host/callback"}, or paste it into the Messaging API tab of the console. 3. Turn on Use webhook in the console; a URL with webhooks disabled is reported by the get endpoint as active: false rather than as an error. 4. Call GET…

Stop debugging LINE by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.