9 months ago
Problem with telegram connection. Credential is ok, but telegram triggers in all projects stoped work suddenly.
1 Reply
a month ago
If the credential test succeeds but Telegram triggers in multiple projects stopped at the same time, first check the webhook rather than rotating the token. Telegram allows only one webhook URL per bot token, so deploying another project with the same token can silently replace the previous project's webhook.
- Inspect the current registration without sharing the token publicly:
curl -s https://api.telegram.org/bot<REDACTED_TOKEN>/getWebhookInfo
Check url, pending_update_count, and last_error_message. The URL must match the currently active Railway public domain and the exact trigger path. If it points to another project/old domain, that is the cause.
-
Ensure only one active Telegram trigger uses that bot token. If several Railway projects need triggers, create a separate bot/token for each, or route all updates through one webhook service. Restarting several copies will make them race to overwrite the same webhook.
-
If the webhook is stale, stop every duplicate trigger, remove it with
deleteWebhook, then activate only the intended project so it registers again. Do not paste the token here. -
If
getWebhookInfoshows the correct URL, open that URL externally and inspect the Railway HTTP/deploy logs at the same timestamp. A 404 means the path changed; 401/403 means app middleware is blocking Telegram; 502/timeout means the service is not listening on0.0.0.0:$PORTor is unhealthy. Also confirm the public domain was not regenerated.
Because all projects failed together while credential validation still passes, a shared-token webhook collision is the highest-probability explanation. Please post the redacted getWebhookInfo result (URL host/path, pending count, and last error only) if it still fails.
AI assistance disclosure: this response was prepared with AI assistance and reviewed against Telegram's webhook behavior before posting.