I’m having trouble with my Telegram bot webhook setup. When I configure the webhook URL, it appears to register successfully, but my bot won’t respond to messages from users.
I’ve tested my webhook handler code using the getUpdates method and it works perfectly fine. My hosting server also has a valid SSL certificate installed.
However, when I check getWebhookInfo, I keep getting this error message: “Wrong response from the webhook: 410 Gone”.
Has anyone encountered this issue before? What could be causing this 410 status code?
Had this exact issue when my webhook was timing out. Telegram throws 410 Gone when your server’s too slow responding to webhooks, even if you eventually process them right. Their timeout’s officially 60 seconds but it’s way shorter in practice. My webhook was doing database stuff that sometimes took 15-20 seconds during busy periods. Fixed it by immediately sending 200 OK back to Telegram, then running the actual bot logic async in the background. I’d add some logging to check your response times and speed up any slow parts.
The 410 Gone error means your webhook endpoint is actively returning this status code - it’s telling Telegram the resource is permanently gone. This isn’t like a 404 or 500 error where something’s broken. Your server is deliberately sending this response.
I hit this same issue when my hosting provider changed their routing setup without warning. My SSL was fine and the endpoint looked accessible, but it kept returning 410 for webhook requests. Check if your host has restrictions on POST requests or if there’s middleware intercepting them.
Also possible - your webhook handler might be catching exceptions and returning 410 instead of 200. Make sure your code explicitly returns 200 OK after processing updates, even when the update doesn’t need any bot action.
had this exact issue last month! my webhook url was doing a 301/302 redirect and telegram follows those but gets confused afterward. the final endpoint worked perfectly, but that redirect chain triggered the 410 error. check if your webhook url redirects anywhere - test it with curl to see what’s actually happening.