Hey everyone, I’m having trouble with my Telegram bot. It works fine when I use it, but it’s not responding to other users. I checked the getWebhookInfo and it’s showing a 500 Internal Server Error for the webhook response.
I’ve gone through my code multiple times and can’t find any issues. It all seems to be working correctly.
What’s weird is that the pending_update_count keeps increasing every time another user sends a message to the bot. This doesn’t happen with my account though.
I’m using Codeigniter MVC for this bot. Has anyone run into a similar problem or know what might be causing this? Any help would be really appreciated!
I’ve dealt with similar Telegram bot issues before, and it can be frustrating. From my experience, the 500 error often points to server-side problems. Have you checked your server logs for any PHP errors or memory issues? That’s usually the first place I look.
One thing that helped me was ensuring my webhook script returns a 200 OK response quickly. Telegram has strict timeout limits, so if your code takes too long to process, it’ll trigger errors.
Also, double-check your SSL certificate. I once spent hours debugging only to realize my cert had expired! Telegram is picky about valid SSL for webhooks.
Lastly, consider temporarily setting up a simple webhook that just returns 200 OK. This can help clear the pending updates and might give you more insight into what’s happening. Good luck troubleshooting!
Have you checked your server’s error logs? Often, a 500 error indicates an issue on the server side that’s not visible in your code. It could be a PHP error, a database connection problem, or even a memory limit being reached.
Given that it works for you but not others, it might be related to how you’re handling authentication or user sessions. Make sure you’re not accidentally tying the bot’s functionality to your specific user session.
Also, ensure your webhook is responding quickly enough. Telegram has a timeout limit, and if your server takes too long to process a request, it’ll result in an error. You might need to optimize your code or increase your server resources.
Lastly, double-check your SSL certificate. Telegram requires a valid SSL for webhooks, and an expired or misconfigured certificate could cause these issues.
yo, i had a similar issue. turns out my webhook was timing out. check ur server logs, might be some PHP errors or something. also, make sure ur returning a 200 OK response. that fixed it for me. good luck!