LINE error 404: Cannot find channel key that satisfies the conditions
Last verified against LINE Developers - Messaging API reference (error responses)
Cannot find channel key that satisfies the conditionsWhat error 404 means
One of the JWT-based token endpoints - issue channel access token v2.1, get all valid channel access token key IDs v2.1, or issue a stateless channel access token with a JWT assertion - couldn't match your JWT to a key registered on the channel. The documented 404 row reads: "The signature key associated with the JWT assertion isn't registered in the channel."
Channel access token v2.1 works with an assertion signing key pair. You generate the key pair yourself, register the public key in the LINE Developers Console for the channel, and the console gives you a kid. Your JWT header must carry that kid, and the JWT must be signed with the matching private key. LINE looks up the key by kid on the channel named in the iss and sub claims; if no such key exists there, you get this 404.
This is different from a JWT that LINE can find a key for but can't verify, or that has expired. Those come back as 400 with the invalid_client shape (for example "iss and clientId of key do not match" or "Invalid exp"), covered under invalid_client. A 404 means no key was found at all.
What it looks like
// If the signature key associated with the JWT assertion isn't registered in the channel (404 Not Found)
{
"message": "Cannot find channel key that satisfies the conditions"
}Why it happens
- The kid in the JWT header is wrong, stale, or copied from a different channel.
- The public key was registered on a different channel than the one in the iss and sub claims.
- The assertion key was deleted from the console but the old kid is still in your config.
- Staging and production channel IDs or kids were swapped in environment variables.
How to fix LINE error 404
- 1Decode your JWT (header and payload are plain base64url) and note kid, iss and sub.
- 2Open the channel whose ID equals iss and sub in the LINE Developers Console, and check the registered assertion signing keys for that kid.
- 3If the key is missing, register your public key on that channel and use the kid the console returns.
- 4Confirm the private key you sign with matches the registered public key before retrying.
How to stop it recurring
Keep channel ID, kid, and private key together as one secret per environment instead of three separate variables that can drift. When you rotate assertion keys, register the new public key first, deploy the new kid, and delete the old key only after nothing signs with it. A startup self-test that issues and then revokes a token catches mismatches before traffic arrives.
Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.
Related codes
- 400: invalid_client (invalid client_id / client_secret)invalid_client / invalid client_id <detail varies>
- 400: The maximum number of access tokens has already been issuedThe maximum number of access tokens has already been issued
- 400: The access token expiredinvalid_request / The access token expired
- 401: Authentication failedAuthentication failed due to the following reason: XXX <detail varies>
Error 404 - quick answers
What does LINE error 404 mean?
One of the JWT-based token endpoints - issue channel access token v2.1, get all valid channel access token key IDs v2.1, or issue a stateless channel access token with a JWT assertion - couldn't match your JWT to a key registered on the channel.
How do I fix LINE error 404?
1. Decode your JWT (header and payload are plain base64url) and note kid, iss and sub. 2. Open the channel whose ID equals iss and sub in the LINE Developers Console, and check the registered assertion signing keys for that kid. 3. If the key is missing, register your public key on that channel and use the kid the console returns. 4. Confirm the private key you sign with matches the registered public key before retrying.
Stop debugging LINE by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.